提交 b9c1315f 编写于 作者: D Daniel P. Berrange

Fix naming of methods in ESX storage backends to follow public APIs

The previous update of method naming missed the ESX storage
backend files. Update them is that the driver impl methods
follow the naming of the public API but with s/vir/esx/
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 4e6b73d2
......@@ -51,7 +51,7 @@ verify(MD5_DIGEST_SIZE == VIR_UUID_BUFLEN);
static int
esxStorageBackendISCSINumberOfPools(virConnectPtr conn)
esxConnectNumOfStoragePools(virConnectPtr conn)
{
bool success = false;
int count = 0;
......@@ -95,7 +95,7 @@ esxStorageBackendISCSINumberOfPools(virConnectPtr conn)
static int
esxStorageBackendISCSIListPools(virConnectPtr conn, char **const names,
esxConnectListStoragePools(virConnectPtr conn, char **const names,
const int maxnames)
{
bool success = false;
......@@ -154,7 +154,7 @@ esxStorageBackendISCSIListPools(virConnectPtr conn, char **const names,
static virStoragePoolPtr
esxStorageBackendISCSIPoolLookupByName(virConnectPtr conn,
esxStoragePoolLookupByName(virConnectPtr conn,
const char *name)
{
esxPrivate *priv = conn->storagePrivateData;
......@@ -196,7 +196,7 @@ esxStorageBackendISCSIPoolLookupByName(virConnectPtr conn,
static virStoragePoolPtr
esxStorageBackendISCSIPoolLookupByUUID(virConnectPtr conn,
esxStoragePoolLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
virStoragePoolPtr pool = NULL;
......@@ -245,7 +245,7 @@ esxStorageBackendISCSIPoolLookupByUUID(virConnectPtr conn,
static int
esxStorageBackendISCSIPoolRefresh(virStoragePoolPtr pool,
esxStoragePoolRefresh(virStoragePoolPtr pool,
unsigned int flags)
{
int result = -1;
......@@ -280,7 +280,7 @@ esxStorageBackendISCSIPoolRefresh(virStoragePoolPtr pool,
static int
esxStorageBackendISCSIPoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
esxStoragePoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
virStoragePoolInfoPtr info)
{
/* These fields are not valid for iSCSI pool */
......@@ -293,7 +293,7 @@ esxStorageBackendISCSIPoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
static char *
esxStorageBackendISCSIPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
{
char *xml = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
......@@ -358,7 +358,7 @@ esxStorageBackendISCSIPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
static int
esxStorageBackendISCSIPoolNumberOfVolumes(virStoragePoolPtr pool)
esxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
int count = 0;
esxPrivate *priv = pool->conn->storagePrivateData;
......@@ -384,7 +384,7 @@ esxStorageBackendISCSIPoolNumberOfVolumes(virStoragePoolPtr pool)
static int
esxStorageBackendISCSIPoolListVolumes(virStoragePoolPtr pool, char **const names,
esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int maxnames)
{
bool success = false;
......@@ -444,7 +444,7 @@ esxStorageBackendISCSIPoolListVolumes(virStoragePoolPtr pool, char **const names
static virStorageVolPtr
esxStorageBackendISCSIVolumeLookupByName(virStoragePoolPtr pool,
esxStorageVolLookupByName(virStoragePoolPtr pool,
const char *name)
{
virStorageVolPtr volume = NULL;
......@@ -491,7 +491,7 @@ esxStorageBackendISCSIVolumeLookupByName(virStoragePoolPtr pool,
static virStorageVolPtr
esxStorageBackendISCSIVolumeLookupByPath(virConnectPtr conn, const char *path)
esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
......@@ -539,7 +539,7 @@ esxStorageBackendISCSIVolumeLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolPtr
esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
......@@ -552,7 +552,7 @@ esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
/* key may be LUN device path */
if (STRPREFIX(key, "/")) {
return esxStorageBackendISCSIVolumeLookupByPath(conn, key);
return esxStorageVolLookupByPath(conn, key);
}
if (esxVI_LookupScsiLunList(priv->primary, &scsiLunList) < 0) {
......@@ -594,7 +594,7 @@ esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
esxStorageBackendISCSIVolumeCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
esxStorageVolCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
const char *xmldesc ATTRIBUTE_UNUSED,
unsigned int flags)
{
......@@ -609,7 +609,7 @@ esxStorageBackendISCSIVolumeCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
static virStorageVolPtr
esxStorageBackendISCSIVolumeCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
const char *xmldesc ATTRIBUTE_UNUSED,
virStorageVolPtr sourceVolume ATTRIBUTE_UNUSED,
unsigned int flags)
......@@ -625,7 +625,7 @@ esxStorageBackendISCSIVolumeCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSE
static char *
esxStorageBackendISCSIVolumeGetXMLDesc(virStorageVolPtr volume,
esxStorageVolGetXMLDesc(virStorageVolPtr volume,
unsigned int flags)
{
char *xml = NULL;
......@@ -701,7 +701,7 @@ esxStorageBackendISCSIVolumeGetXMLDesc(virStorageVolPtr volume,
static int
esxStorageBackendISCSIVolumeDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
esxStorageVolDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(0, -1);
......@@ -715,7 +715,7 @@ esxStorageBackendISCSIVolumeDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
static int
esxStorageBackendISCSIVolumeWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
esxStorageVolWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(0, -1);
......@@ -730,7 +730,7 @@ esxStorageBackendISCSIVolumeWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
static char *
esxStorageBackendISCSIVolumeGetPath(virStorageVolPtr volume)
esxStorageVolGetPath(virStorageVolPtr volume)
{
char *path;
......@@ -741,22 +741,22 @@ esxStorageBackendISCSIVolumeGetPath(virStorageVolPtr volume)
virStorageDriver esxStorageBackendISCSI = {
.connectNumOfStoragePools = esxStorageBackendISCSINumberOfPools, /* 1.0.1 */
.connectListStoragePools = esxStorageBackendISCSIListPools, /* 1.0.1 */
.storagePoolLookupByName = esxStorageBackendISCSIPoolLookupByName, /* 1.0.1 */
.storagePoolLookupByUUID = esxStorageBackendISCSIPoolLookupByUUID, /* 1.0.1 */
.storagePoolRefresh = esxStorageBackendISCSIPoolRefresh, /* 1.0.1 */
.storagePoolGetInfo = esxStorageBackendISCSIPoolGetInfo, /* 1.0.1 */
.storagePoolGetXMLDesc = esxStorageBackendISCSIPoolGetXMLDesc, /* 1.0.1 */
.storagePoolNumOfVolumes = esxStorageBackendISCSIPoolNumberOfVolumes, /* 1.0.1 */
.storagePoolListVolumes = esxStorageBackendISCSIPoolListVolumes, /* 1.0.1 */
.storageVolLookupByName = esxStorageBackendISCSIVolumeLookupByName, /* 1.0.1 */
.storageVolLookupByPath = esxStorageBackendISCSIVolumeLookupByPath, /* 1.0.1 */
.storageVolLookupByKey = esxStorageBackendISCSIVolumeLookupByKey, /* 1.0.1 */
.storageVolCreateXML = esxStorageBackendISCSIVolumeCreateXML, /* 1.0.1 */
.storageVolCreateXMLFrom = esxStorageBackendISCSIVolumeCreateXMLFrom, /* 1.0.1 */
.storageVolGetXMLDesc = esxStorageBackendISCSIVolumeGetXMLDesc, /* 1.0.1 */
.storageVolDelete = esxStorageBackendISCSIVolumeDelete, /* 1.0.1 */
.storageVolWipe = esxStorageBackendISCSIVolumeWipe, /* 1.0.1 */
.storageVolGetPath = esxStorageBackendISCSIVolumeGetPath, /* 1.0.1 */
.connectNumOfStoragePools = esxConnectNumOfStoragePools, /* 1.0.1 */
.connectListStoragePools = esxConnectListStoragePools, /* 1.0.1 */
.storagePoolLookupByName = esxStoragePoolLookupByName, /* 1.0.1 */
.storagePoolLookupByUUID = esxStoragePoolLookupByUUID, /* 1.0.1 */
.storagePoolRefresh = esxStoragePoolRefresh, /* 1.0.1 */
.storagePoolGetInfo = esxStoragePoolGetInfo, /* 1.0.1 */
.storagePoolGetXMLDesc = esxStoragePoolGetXMLDesc, /* 1.0.1 */
.storagePoolNumOfVolumes = esxStoragePoolNumOfVolumes, /* 1.0.1 */
.storagePoolListVolumes = esxStoragePoolListVolumes, /* 1.0.1 */
.storageVolLookupByName = esxStorageVolLookupByName, /* 1.0.1 */
.storageVolLookupByPath = esxStorageVolLookupByPath, /* 1.0.1 */
.storageVolLookupByKey = esxStorageVolLookupByKey, /* 1.0.1 */
.storageVolCreateXML = esxStorageVolCreateXML, /* 1.0.1 */
.storageVolCreateXMLFrom = esxStorageVolCreateXMLFrom, /* 1.0.1 */
.storageVolGetXMLDesc = esxStorageVolGetXMLDesc, /* 1.0.1 */
.storageVolDelete = esxStorageVolDelete, /* 1.0.1 */
.storageVolWipe = esxStorageVolWipe, /* 1.0.1 */
.storageVolGetPath = esxStorageVolGetPath, /* 1.0.1 */
};
......@@ -111,7 +111,7 @@ esxLookupVMFSStoragePoolType(esxVI_Context *ctx, const char *poolName,
static int
esxStorageBackendVMFSNumberOfPools(virConnectPtr conn)
esxConnectNumOfStoragePools(virConnectPtr conn)
{
int count = 0;
esxPrivate *priv = conn->storagePrivateData;
......@@ -135,7 +135,7 @@ esxStorageBackendVMFSNumberOfPools(virConnectPtr conn)
static int
esxStorageBackendVMFSListPools(virConnectPtr conn, char **const names,
esxConnectListStoragePools(virConnectPtr conn, char **const names,
const int maxnames)
{
bool success = false;
......@@ -199,7 +199,7 @@ esxStorageBackendVMFSListPools(virConnectPtr conn, char **const names,
static virStoragePoolPtr
esxStorageBackendVMFSPoolLookupByName(virConnectPtr conn,
esxStoragePoolLookupByName(virConnectPtr conn,
const char *name)
{
esxPrivate *priv = conn->storagePrivateData;
......@@ -252,7 +252,7 @@ esxStorageBackendVMFSPoolLookupByName(virConnectPtr conn,
static virStoragePoolPtr
esxStorageBackendVMFSPoolLookupByUUID(virConnectPtr conn,
esxStoragePoolLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
esxPrivate *priv = conn->storagePrivateData;
......@@ -321,7 +321,7 @@ esxStorageBackendVMFSPoolLookupByUUID(virConnectPtr conn,
static int
esxStorageBackendVMFSPoolRefresh(virStoragePoolPtr pool, unsigned int flags)
esxStoragePoolRefresh(virStoragePoolPtr pool, unsigned int flags)
{
int result = -1;
esxPrivate *priv = pool->conn->storagePrivateData;
......@@ -346,7 +346,7 @@ esxStorageBackendVMFSPoolRefresh(virStoragePoolPtr pool, unsigned int flags)
static int
esxStorageBackendVMFSPoolGetInfo(virStoragePoolPtr pool,
esxStoragePoolGetInfo(virStoragePoolPtr pool,
virStoragePoolInfoPtr info)
{
int result = -1;
......@@ -407,7 +407,7 @@ esxStorageBackendVMFSPoolGetInfo(virStoragePoolPtr pool,
static char *
esxStorageBackendVMFSPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
esxVI_String *propertyNameList = NULL;
......@@ -527,7 +527,7 @@ esxStorageBackendVMFSPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
static int
esxStorageBackendVMFSPoolNumberOfVolumes(virStoragePoolPtr pool)
esxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
bool success = false;
esxPrivate *priv = pool->conn->storagePrivateData;
......@@ -561,7 +561,7 @@ esxStorageBackendVMFSPoolNumberOfVolumes(virStoragePoolPtr pool)
static int
esxStorageBackendVMFSPoolListVolumes(virStoragePoolPtr pool, char **const names,
esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int maxnames)
{
bool success = false;
......@@ -642,7 +642,7 @@ esxStorageBackendVMFSPoolListVolumes(virStoragePoolPtr pool, char **const names,
static virStorageVolPtr
esxStorageBackendVMFSVolumeLookupByName(virStoragePoolPtr pool,
esxStorageVolLookupByName(virStoragePoolPtr pool,
const char *name)
{
virStorageVolPtr volume = NULL;
......@@ -673,7 +673,7 @@ esxStorageBackendVMFSVolumeLookupByName(virStoragePoolPtr pool,
static virStorageVolPtr
esxStorageBackendVMFSVolumeLookupByPath(virConnectPtr conn, const char *path)
esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
......@@ -705,7 +705,7 @@ esxStorageBackendVMFSVolumeLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolPtr
esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
......@@ -725,7 +725,7 @@ esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
if (STRPREFIX(key, "[")) {
/* Key is probably a datastore path */
return esxStorageBackendVMFSVolumeLookupByPath(conn, key);
return esxStorageVolLookupByPath(conn, key);
}
if (!priv->primary->hasQueryVirtualDiskUuid) {
......@@ -842,7 +842,7 @@ esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
esxStorageBackendVMFSVolumeCreateXML(virStoragePoolPtr pool,
esxStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc,
unsigned int flags)
{
......@@ -1071,7 +1071,7 @@ esxStorageBackendVMFSVolumeCreateXML(virStoragePoolPtr pool,
static virStorageVolPtr
esxStorageBackendVMFSVolumeCreateXMLFrom(virStoragePoolPtr pool,
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc,
virStorageVolPtr sourceVolume,
unsigned int flags)
......@@ -1268,7 +1268,7 @@ esxStorageBackendVMFSVolumeCreateXMLFrom(virStoragePoolPtr pool,
static int
esxStorageBackendVMFSVolumeDelete(virStorageVolPtr volume, unsigned int flags)
esxStorageVolDelete(virStorageVolPtr volume, unsigned int flags)
{
int result = -1;
esxPrivate *priv = volume->conn->storagePrivateData;
......@@ -1313,7 +1313,7 @@ esxStorageBackendVMFSVolumeDelete(virStorageVolPtr volume, unsigned int flags)
static int
esxStorageBackendVMFSVolumeWipe(virStorageVolPtr volume, unsigned int flags)
esxStorageVolWipe(virStorageVolPtr volume, unsigned int flags)
{
int result = -1;
esxPrivate *priv = volume->conn->storagePrivateData;
......@@ -1358,7 +1358,7 @@ esxStorageBackendVMFSVolumeWipe(virStorageVolPtr volume, unsigned int flags)
static int
esxStorageBackendVMFSVolumeGetInfo(virStorageVolPtr volume,
esxStorageVolGetInfo(virStorageVolPtr volume,
virStorageVolInfoPtr info)
{
int result = -1;
......@@ -1405,7 +1405,7 @@ esxStorageBackendVMFSVolumeGetInfo(virStorageVolPtr volume,
static char *
esxStorageBackendVMFSVolumeGetXMLDesc(virStorageVolPtr volume,
esxStorageVolGetXMLDesc(virStorageVolPtr volume,
unsigned int flags)
{
esxPrivate *priv = volume->conn->storagePrivateData;
......@@ -1489,7 +1489,7 @@ esxStorageBackendVMFSVolumeGetXMLDesc(virStorageVolPtr volume,
static char *
esxStorageBackendVMFSVolumeGetPath(virStorageVolPtr volume)
esxStorageVolGetPath(virStorageVolPtr volume)
{
char *path;
......@@ -1504,23 +1504,23 @@ esxStorageBackendVMFSVolumeGetPath(virStorageVolPtr volume)
virStorageDriver esxStorageBackendVMFS = {
.connectNumOfStoragePools = esxStorageBackendVMFSNumberOfPools, /* 0.8.2 */
.connectListStoragePools = esxStorageBackendVMFSListPools, /* 0.8.2 */
.storagePoolLookupByName = esxStorageBackendVMFSPoolLookupByName, /* 0.8.2 */
.storagePoolLookupByUUID = esxStorageBackendVMFSPoolLookupByUUID, /* 0.8.2 */
.storagePoolRefresh = esxStorageBackendVMFSPoolRefresh, /* 0.8.2 */
.storagePoolGetInfo = esxStorageBackendVMFSPoolGetInfo, /* 0.8.2 */
.storagePoolGetXMLDesc = esxStorageBackendVMFSPoolGetXMLDesc, /* 0.8.2 */
.storagePoolNumOfVolumes = esxStorageBackendVMFSPoolNumberOfVolumes, /* 0.8.4 */
.storagePoolListVolumes = esxStorageBackendVMFSPoolListVolumes, /* 0.8.4 */
.storageVolLookupByName = esxStorageBackendVMFSVolumeLookupByName, /* 0.8.4 */
.storageVolLookupByPath = esxStorageBackendVMFSVolumeLookupByPath, /* 0.8.4 */
.storageVolLookupByKey = esxStorageBackendVMFSVolumeLookupByKey, /* 0.8.4 */
.storageVolCreateXML = esxStorageBackendVMFSVolumeCreateXML, /* 0.8.4 */
.storageVolCreateXMLFrom = esxStorageBackendVMFSVolumeCreateXMLFrom, /* 0.8.7 */
.storageVolDelete = esxStorageBackendVMFSVolumeDelete, /* 0.8.7 */
.storageVolWipe = esxStorageBackendVMFSVolumeWipe, /* 0.8.7 */
.storageVolGetInfo = esxStorageBackendVMFSVolumeGetInfo, /* 0.8.4 */
.storageVolGetXMLDesc = esxStorageBackendVMFSVolumeGetXMLDesc, /* 0.8.4 */
.storageVolGetPath = esxStorageBackendVMFSVolumeGetPath, /* 0.8.4 */
.connectNumOfStoragePools = esxConnectNumOfStoragePools, /* 0.8.2 */
.connectListStoragePools = esxConnectListStoragePools, /* 0.8.2 */
.storagePoolLookupByName = esxStoragePoolLookupByName, /* 0.8.2 */
.storagePoolLookupByUUID = esxStoragePoolLookupByUUID, /* 0.8.2 */
.storagePoolRefresh = esxStoragePoolRefresh, /* 0.8.2 */
.storagePoolGetInfo = esxStoragePoolGetInfo, /* 0.8.2 */
.storagePoolGetXMLDesc = esxStoragePoolGetXMLDesc, /* 0.8.2 */
.storagePoolNumOfVolumes = esxStoragePoolNumOfVolumes, /* 0.8.4 */
.storagePoolListVolumes = esxStoragePoolListVolumes, /* 0.8.4 */
.storageVolLookupByName = esxStorageVolLookupByName, /* 0.8.4 */
.storageVolLookupByPath = esxStorageVolLookupByPath, /* 0.8.4 */
.storageVolLookupByKey = esxStorageVolLookupByKey, /* 0.8.4 */
.storageVolCreateXML = esxStorageVolCreateXML, /* 0.8.4 */
.storageVolCreateXMLFrom = esxStorageVolCreateXMLFrom, /* 0.8.7 */
.storageVolDelete = esxStorageVolDelete, /* 0.8.7 */
.storageVolWipe = esxStorageVolWipe, /* 0.8.7 */
.storageVolGetInfo = esxStorageVolGetInfo, /* 0.8.4 */
.storageVolGetXMLDesc = esxStorageVolGetXMLDesc, /* 0.8.4 */
.storageVolGetPath = esxStorageVolGetPath, /* 0.8.4 */
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册