Change in vdsm[master]: netwiring: [1/3] Add API definitions.

asegurap at redhat.com asegurap at redhat.com
Thu Nov 29 01:26:37 UTC 2012


Antoni Segura Puimedon has uploaded a new change for review.

Change subject: netwiring: [1/3] Add API definitions.
......................................................................

netwiring: [1/3] Add API definitions.

First of the Network Wiring feature patches. It adds the schema
definitions as described in:
    http://wiki.ovirt.org/wiki/Feature/DetailedNetworkWiring#New_API

Change-Id: I9d8352f237dbe0229dff368f7c1dfa4f5f8fc766
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M vdsm/BindingXMLRPC.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 51 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/9560/1

diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index d460910..60efbdf 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -262,6 +262,10 @@
         vm = API.VM(params['vmId'])
         return vm.hotunplugNic(params)
 
+    def updateVmDevice(self, vmId, params):
+        vm = API.VM(vmId)
+        return vm.updateDevice(params)
+
     def vmSnapshot(self, vmId, snapDrives):
         vm = API.VM(vmId)
         return vm.snapshot(snapDrives)
@@ -789,7 +793,8 @@
                 (self.vmHotplugDisk, 'hotplugDisk'),
                 (self.vmHotunplugDisk, 'hotunplugDisk'),
                 (self.vmHotplugNic, 'hotplugNic'),
-                (self.vmHotunplugNic, 'hotunplugNic'))
+                (self.vmHotunplugNic, 'hotunplugNic'),
+                (self.updateVmDevice, 'updateVmDevice'))
 
     def getIrsMethods(self):
         return ((self.domainActivate, 'activateStorageDomain'),
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 843cbc7..3818ab7 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -4849,6 +4849,51 @@
  'data': {'hibernationVolHandle': 'HibernationVolumeHandle'}}
 
 ##
+# @updateVmDeviceParams:
+#
+# Parameters for @VM.updateVmDevice
+#
+# @type: The type of device to update. For example 'interface' for network
+# devices or 'disk' for disk storage devices.
+#
+# @alias: Alias used to identify this device in commands.
+#
+# @network: Name of the bridge the interface will be added to.
+#
+# @linkState: The state in which the link of the interface will be upon
+# successful completion of the api request. The values can be 'up' or 'down'.
+#
+# @promisc: If present, indicates the traffic of the network which should be
+# mirrored to the interface identified by alias.
+#
+# Since 4.11.0
+##
+{'type': 'updateVmDeviceParams',
+ 'data': {'type': 'str', 'network': 'str',
+          'linkState': 'NetworkInterfaceState', 'alias': 'str', 'promisc': ''}}
+
+##
+# @VM.updateVmDevice:
+#
+# Update the status of a VM's device.
+#
+# @vmId:  The UUID of the VM to modify
+#
+# @params: The VM UUID and device information.
+#
+# Returns:
+# The VM definition, as updated
+#
+# Since: 4.11.0
+#
+# Notes:
+# XXX: Split 'params' into direct parameters
+##
+{'command': {'class': 'VM', 'name': 'updateVmDevice'},
+ 'data': {'vmId': 'UUID', 'params': 'updateVmDeviceParams'},
+ 'returns': 'VmDefinition'}
+
+##
 # @HotplugNicParams:
 #
 # Parameters for @VM.hotplugNic.


--
To view, visit http://gerrit.ovirt.org/9560
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d8352f237dbe0229dff368f7c1dfa4f5f8fc766
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>


More information about the vdsm-patches mailing list