On 11/25/2013 08:54 AM, Daniel P. Berrange wrote:
>> VIR_ENUM_IMPL(virStorageVol,
>> VIR_STORAGE_VOL_LAST,
>> - "file", "block", "dir",
"network")
>> + "file", "block", "dir",
"network", "network-dir")
>
> I've got to say I really don't like this naming but not
> got a better suggestion yet.
Could we at least shorten it to 'netdir' ?
Done, and pushed (we have until 1.2.0 is actually released to change our
minds with a baked-in name, but the shorter netdir works for me).
diff --git i/docs/formatstorage.html.in w/docs/formatstorage.html.in
index d9ceeae..a089a31 100644
--- i/docs/formatstorage.html.in
+++ w/docs/formatstorage.html.in
@@ -291,7 +291,7 @@
A storage volume will generally be either a file or a device
node; <span class="since">since 1.2.0</span>, an optional
output-only attribute <code>type</code> lists the actual type
- (file, block, dir, network, or network-dir), which is also available
+ (file, block, dir, network, or netdir), which is also available
from <code>virStorageVolGetInfo()</code>. The storage volume
XML format is available <span class="since">since
0.4.1</span>
</p>
diff --git i/docs/schemas/storagevol.rng w/docs/schemas/storagevol.rng
index 45207b4..8f07d8f 100644
--- i/docs/schemas/storagevol.rng
+++ w/docs/schemas/storagevol.rng
@@ -20,7 +20,7 @@
<value>block</value>
<value>dir</value>
<value>network</value>
- <value>network-dir</value>
+ <value>netdir</value>
</choice>
</attribute>
</optional>
diff --git i/include/libvirt/libvirt.h.in w/include/libvirt/libvirt.h.in
index 5e8cba6..5aad75c 100644
--- i/include/libvirt/libvirt.h.in
+++ w/include/libvirt/libvirt.h.in
@@ -2951,8 +2951,8 @@ typedef enum {
VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */
VIR_STORAGE_VOL_DIR = 2, /* Directory-passthrough based volume */
VIR_STORAGE_VOL_NETWORK = 3, /* Network volumes like RBD (RADOS
Block Device) */
- VIR_STORAGE_VOL_NETWORK_DIR = 4, /* Network accessible directory
that can
- * contain other network volumes */
+ VIR_STORAGE_VOL_NETDIR = 4, /* Network accessible directory that can
+ * contain other network volumes */
#ifdef VIR_ENUM_SENTINELS
VIR_STORAGE_VOL_LAST
diff --git i/src/conf/storage_conf.c w/src/conf/storage_conf.c
index 3ea5bd7..22e38c1 100644
--- i/src/conf/storage_conf.c
+++ w/src/conf/storage_conf.c
@@ -53,7 +53,7 @@
VIR_ENUM_IMPL(virStorageVol,
VIR_STORAGE_VOL_LAST,
- "file", "block", "dir", "network",
"network-dir")
+ "file", "block", "dir", "network",
"netdir")
VIR_ENUM_IMPL(virStoragePool,
VIR_STORAGE_POOL_LAST,
diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c
index 6d22bc8..763417f 100644
--- i/src/qemu/qemu_command.c
+++ w/src/qemu/qemu_command.c
@@ -3825,7 +3825,7 @@ qemuBuildVolumeString(virConnectPtr conn,
}
break;
case VIR_STORAGE_VOL_NETWORK:
- case VIR_STORAGE_VOL_NETWORK_DIR:
+ case VIR_STORAGE_VOL_NETDIR:
case VIR_STORAGE_VOL_LAST:
/* Keep the compiler quiet, qemuTranslateDiskSourcePool already
* reported the unsupported error.
diff --git i/src/qemu/qemu_conf.c w/src/qemu/qemu_conf.c
index 3c1e248..77df370 100644
--- i/src/qemu/qemu_conf.c
+++ w/src/qemu/qemu_conf.c
@@ -1377,7 +1377,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn,
break;
case VIR_STORAGE_VOL_NETWORK:
- case VIR_STORAGE_VOL_NETWORK_DIR:
+ case VIR_STORAGE_VOL_NETDIR:
case VIR_STORAGE_VOL_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Using network volume as disk source is not
supported"));
diff --git i/src/storage/storage_backend_fs.c
w/src/storage/storage_backend_fs.c
index 2af6faf..11cf2df 100644
--- i/src/storage/storage_backend_fs.c
+++ w/src/storage/storage_backend_fs.c
@@ -1159,7 +1159,7 @@ virStorageBackendFileSystemVolDelete(virConnectPtr
conn ATTRIBUTE_UNUSED,
break;
case VIR_STORAGE_VOL_BLOCK:
case VIR_STORAGE_VOL_NETWORK:
- case VIR_STORAGE_VOL_NETWORK_DIR:
+ case VIR_STORAGE_VOL_NETDIR:
case VIR_STORAGE_VOL_LAST:
virReportError(VIR_ERR_NO_SUPPORT,
_("removing block or network volumes is not
supported: %s"),
diff --git i/tools/virsh-volume.c w/tools/virsh-volume.c
index 66d9922..22b10d5 100644
--- i/tools/virsh-volume.c
+++ w/tools/virsh-volume.c
@@ -960,8 +960,8 @@ vshVolumeTypeToString(int type)
case VIR_STORAGE_VOL_NETWORK:
return N_("network");
- case VIR_STORAGE_VOL_NETWORK_DIR:
- return N_("net-dir");
+ case VIR_STORAGE_VOL_NETDIR:
+ return N_("netdir");
case VIR_STORAGE_VOL_LAST:
break;
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org