[PATCH] Use camelCase for XML attribute numQueues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit d4bf0a9, we used num_queues for an attribute in the XML, but
the consensus is that we use camelCase for that.  Since there was no
release yet (the above commit describes as v1.0.4-65-gd4bf0a9), we
still have time to change it.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
This patch applies on top of Laine's RNG tightening patch [1] and it
was proposed in that thread as well.

[1] http://www.redhat.com/archives/libvir-list/2013-April/msg01320.html
---
 docs/formatdomain.html.in                                           | 2 +-
 docs/schemas/domaincommon.rng                                       | 2 +-
 src/conf/domain_conf.c                                              | 6 +++---
 src/qemu/qemu_command.c                                             | 2 +-
 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0cc56d9..a5be162 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2135,7 +2135,7 @@
       controller.  A "scsi" controller has an optional
       attribute <code>model</code>, which is one of "auto", "buslogic",
       "ibmvscsi", "lsilogic", "lsisas1068", "lsisas1078", "virtio-scsi" or
-      "vmpvscsi".  The attribute <code>num_queues</code>
+      "vmpvscsi".  The attribute <code>numQueues</code>
       (<span class="since">1.0.5 (QEMU and KVM only)</span>) specifies
       the number of queues for the controller. For best performance, it's
       recommended to specify a value matching the number of vCPUs.  A "usb"
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3976b82..bcb1453 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1444,7 +1444,7 @@
               </attribute>
             </optional>
             <optional>
-              <attribute name="num_queues">
+              <attribute name="numQueues">
                 <ref name="unsignedInt"/>
               </attribute>
             </optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1643f30..0487053 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5195,10 +5195,10 @@ virDomainControllerDefParseXML(xmlNodePtr node,
         def->model = -1;
     }

-    if ((num_queues = virXMLPropString(node, "num_queues"))) {
+    if ((num_queues = virXMLPropString(node, "numQueues"))) {
         if (virStrToLong_ui(num_queues, NULL, 10, &def->num_queues) < 0) {
             virReportError(VIR_ERR_XML_ERROR,
-                           _("Malformed 'num_queues' value '%s'"), num_queues);
+                           _("Malformed 'numQueues' value '%s'"), num_queues);
             goto error;
         }
     }
@@ -13531,7 +13531,7 @@ virDomainControllerDefFormat(virBufferPtr buf,
     }

     if (def->num_queues)
-        virBufferAsprintf(buf, " num_queues='%u'", def->num_queues);
+        virBufferAsprintf(buf, " numQueues='%u'", def->num_queues);

     switch (def->type) {
     case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL:
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 009d42d..65675b7 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3574,7 +3574,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
         !(def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI &&
           def->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("'num_queues' is only supported by virtio-scsi controller"));
+                       _("'numQueues' is only supported by virtio-scsi controller"));
         return NULL;
     }

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
index dfa9cf1..063ccf7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
@@ -20,7 +20,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
+    <controller type='scsi' index='0' model='virtio-scsi' numQueues='8'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
--
1.8.1.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]