Michael Pasternak has uploaded a new change for review.

Change subject: sdk: regenerate against the latest api
......................................................................

sdk: regenerate against the latest api

- to DataCenterStorageDomainDisk added export() action
- to StorageDomainDisk added export() action
- to TemplateDisk added export() action
- to VMDisk added export() action
- to Disk added export() action

Change-Id: Ia9e9b6c8af20216ad409f36a25455c74f8f4cd42
Signed-off-by: Michael pasternak <[email protected]>
---
M src/ovirtsdk/infrastructure/brokers.py
M src/ovirtsdk/xml/params.py
2 files changed, 146 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/11/20011/1

diff --git a/src/ovirtsdk/infrastructure/brokers.py 
b/src/ovirtsdk/infrastructure/brokers.py
index 47066e1..5781d52 100644
--- a/src/ovirtsdk/infrastructure/brokers.py
+++ b/src/ovirtsdk/infrastructure/brokers.py
@@ -20,7 +20,7 @@
 ############ GENERATED CODE ############
 ########################################
 
-'''Generated at: 2013-09-03 17:33:36.497540'''
+'''Generated at: 2013-10-09 09:45:19.614629'''
 
 
 from ovirtsdk.xml import params
@@ -3578,6 +3578,32 @@
             headers={"Correlation-Id":correlation_id,"Content-type":None}
         )
 
+    def export(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param storagedomain.id|name: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = 
'/api/datacenters/{datacenter:id}/storagedomains/{storagedomain:id}/disks/{disk:id}/export'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(
+                url,
+                {'{datacenter:id}' : self.parentclass.parentclass.get_id(),
+                 '{storagedomain:id}': self.parentclass.get_id(),
+                 '{disk:id}': self.get_id()}
+            ),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
+
 class DataCenterStorageDomainDiskPermission(params.Permission, Base):
     def __init__(self, datacenterstoragedomaindisk, permission, context):
         Base.__init__(self, context)
@@ -4317,6 +4343,27 @@
             ),
             headers={"Correlation-Id":correlation_id,"Content-type":None}
         )
+
+    def export(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param storagedomain.id|name: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = '/api/disks/{disk:id}/export'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(url, {'{disk:id}': self.get_id()}),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
 
 class DiskPermission(params.Permission, Base):
     def __init__(self, disk, permission, context):
@@ -6191,10 +6238,9 @@
           [@param host.name: string]
           [@param host.comment: string]
           [@param host.address: string]
-          [@param host.ssh.password: string]
           [@param host.ssh.port: int]
+          [@param host.ssh.user.user_name: string]
           [@param host.ssh.fingerprint: string]
-          [@param host.ssh.authentication_type: string]
           [@param host.display.address: string]
           [@param host.cluster.id|name: string]
           [@param host.port: int]
@@ -7650,12 +7696,13 @@
         Overload 2:
           @param host.name: string
           @param host.address: string
-          @param host.ssh.password: string
           @param host.cluster.id|name: string
           [@param host.comment: string]
           [@param host.ssh.port: int]
           [@param host.ssh.fingerprint: string]
-          [@param host.ssh.authentication_type: string]
+          [@param host.ssh.authentication_method: string]
+          [@param host.ssh.user.user_name: string]
+          [@param host.ssh.user.password: string]
           [@param host.port: int]
           [@param host.display.address: string]
           [@param host.storage_manager.priority: int]
@@ -9334,6 +9381,31 @@
             ),
             headers={"Correlation-Id":correlation_id,"Content-type":None}
         )
+
+    def export(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param storagedomain.id|name: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = '/api/storagedomains/{storagedomain:id}/disks/{disk:id}/export'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(
+                url,
+                {'{storagedomain:id}' : self.parentclass.get_id(),
+                 '{disk:id}': self.get_id()}
+            ),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
 
 class StorageDomainDiskPermission(params.Permission, Base):
     def __init__(self, storagedomaindisk, permission, context):
@@ -11624,6 +11696,31 @@
         '''
 
         url = '/api/templates/{template:id}/disks/{disk:id}/copy'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(
+                url,
+                {'{template:id}' : self.parentclass.get_id(),
+                 '{disk:id}': self.get_id()}
+            ),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
+
+    def export(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param storagedomain.id|name: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = '/api/templates/{template:id}/disks/{disk:id}/export'
 
         result = self.__getProxy().request(
             method='POST',
@@ -14173,6 +14270,31 @@
 
         return result
 
+    def export(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param storagedomain.id|name: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = '/api/vms/{vm:id}/disks/{disk:id}/export'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(
+                url,
+                {'{vm:id}' : self.parentclass.get_id(),
+                 '{disk:id}': self.get_id()}
+            ),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
+
     def move(self, action=params.Action(), correlation_id=None):
         '''
         @type Action:
diff --git a/src/ovirtsdk/xml/params.py b/src/ovirtsdk/xml/params.py
index 1e4d5b6..730ba20 100644
--- a/src/ovirtsdk/xml/params.py
+++ b/src/ovirtsdk/xml/params.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 
 #
-# Generated Tue Sep  3 17:33:19 2013 by generateDS.py version 2.9a.
+# Generated Wed Oct  9 09:45:02 2013 by generateDS.py version 2.9a.
 #
 
 import sys
@@ -2312,8 +2312,8 @@
         level += 1
         for vcpu_pin_ in self.vcpu_pin:
             showIndent(outfile, level)
-            outfile.write('model_.VCpuPin(\n')
-            vcpu_pin_.exportLiteral(outfile, level, name_='VCpuPin')
+            outfile.write('model_.vcpu_pin(\n')
+            vcpu_pin_.exportLiteral(outfile, level)
             showIndent(outfile, level)
             outfile.write('),\n')
         level -= 1
@@ -15803,8 +15803,9 @@
 class GuestInfo(GeneratedsSuper):
     subclass = None
     superclass = None
-    def __init__(self, ips=None):
+    def __init__(self, ips=None, fqdn=None):
         self.ips = ips
+        self.fqdn = fqdn
     def factory(*args_, **kwargs_):
         if GuestInfo.subclass:
             return GuestInfo.subclass(*args_, **kwargs_)
@@ -15813,9 +15814,12 @@
     factory = staticmethod(factory)
     def get_ips(self): return self.ips
     def set_ips(self, ips): self.ips = ips
+    def get_fqdn(self): return self.fqdn
+    def set_fqdn(self, fqdn): self.fqdn = fqdn
     def hasContent_(self):
         if (
-            self.ips is not None
+            self.ips is not None or
+            self.fqdn is not None
             ):
             return True
         else:
@@ -15845,6 +15849,9 @@
             eol_ = ''
         if self.ips is not None:
             self.ips.export(outfile, level, namespace_, name_='ips', 
pretty_print=pretty_print)
+        if self.fqdn is not None:
+            showIndent(outfile, level, pretty_print)
+            outfile.write('<%sfqdn>%s</%sfqdn>%s' % (namespace_, 
self.gds_format_string(quote_xml(self.fqdn).encode(ExternalEncoding), 
input_name='fqdn'), namespace_, eol_))
     def exportLiteral(self, outfile, level, name_='GuestInfo'):
         level += 1
         already_processed = set()
@@ -15860,6 +15867,9 @@
             self.ips.exportLiteral(outfile, level)
             showIndent(outfile, level)
             outfile.write('),\n')
+        if self.fqdn is not None:
+            showIndent(outfile, level)
+            outfile.write('fqdn=%s,\n' % 
quote_python(self.fqdn).encode(ExternalEncoding))
     def build(self, node):
         already_processed = set()
         self.buildAttributes(node, node.attrib, already_processed)
@@ -15873,6 +15883,10 @@
             obj_ = IPs.factory()
             obj_.build(child_)
             self.set_ips(obj_)
+        elif nodeName_ == 'fqdn':
+            fqdn_ = child_.text
+            fqdn_ = self.gds_validate_string(fqdn_, node, 'fqdn')
+            self.fqdn = fqdn_
 # end class GuestInfo
 
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9e9b6c8af20216ad409f36a25455c74f8f4cd42
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Michael Pasternak <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to