Juan Hernandez has uploaded a new change for review.

Change subject: sdk: Regenerate against the latest API
......................................................................

sdk: Regenerate against the latest API

This patch regenerates the SDK using the latest API obtained from the
engine built from commit 5af8d6b, corresponding to 3.5.2.

Change-Id: If8dbd4fc24ac5c0da2abcc0e7a7cff34ab92213a
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
M generator/src/main/resources/api.rsdl
M generator/src/main/resources/api.xsd
M src/ovirtsdk/infrastructure/brokers.py
M src/ovirtsdk/xml/params.py
4 files changed, 95 insertions(+), 8 deletions(-)


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

diff --git a/generator/src/main/resources/api.rsdl 
b/generator/src/main/resources/api.rsdl
index 28e55d2..924c1b0 100644
--- a/generator/src/main/resources/api.rsdl
+++ b/generator/src/main/resources/api.rsdl
@@ -5911,6 +5911,10 @@
                         <name>Filter</name>
                         <value>true|false</value>
                     </header>
+                    <header required="false">
+                        <name>All-Content</name>
+                        <value>true|false</value>
+                    </header>
                 </headers>
                 <url>
                     <parameters_set>
@@ -5980,6 +5984,10 @@
                 <headers>
                     <header required="false">
                         <name>Filter</name>
+                        <value>true|false</value>
+                    </header>
+                    <header required="false">
+                        <name>All-Content</name>
                         <value>true|false</value>
                     </header>
                 </headers>
@@ -10073,6 +10081,41 @@
                 <type>Action</type>
             </response>
         </link>
+        <link 
href="/ovirt-engine/api/storagedomains/{storagedomain:id}/isattached" 
rel="isattached">
+            <description>Querying if the Storage Domain is already attached to 
a Data Center by the is_attached boolean field, which is part of the storage 
server. IMPORTANT, Executing this API will cause the Host to disconnect from 
the Storage Domain.</description>
+            <request>
+                <http_method>POST</http_method>
+                <headers>
+                    <header required="true">
+                        <name>Content-Type</name>
+                        <value>application/xml|json</value>
+                    </header>
+                    <header required="false">
+                        <name>Correlation-Id</name>
+                        <value>any string</value>
+                    </header>
+                </headers>
+                <url>
+                    <parameters_set>
+                        <parameter required="false" type="xs:boolean" 
context="matrix">
+                            <name>async</name>
+                            <value>true|false</value>
+                        </parameter>
+                    </parameters_set>
+                </url>
+                <body>
+                    <type>Action</type>
+                    <parameters_set>
+                        <parameter required="true" type="xs:string">
+                            <name>action.host.id</name>
+                        </parameter>
+                    </parameters_set>
+                </body>
+            </request>
+            <response>
+                <type>Action</type>
+            </response>
+        </link>
         <link 
href="/ovirt-engine/api/storagedomains/{storagedomain:id}/permissions" 
rel="add">
             <description>add a new user or group level permission on the 
storage domain</description>
             <request>
diff --git a/generator/src/main/resources/api.xsd 
b/generator/src/main/resources/api.xsd
index 6fb81fb..c9d2bcc 100644
--- a/generator/src/main/resources/api.xsd
+++ b/generator/src/main/resources/api.xsd
@@ -2578,6 +2578,7 @@
           <xs:element name="committed" type="xs:long" minOccurs="0"/>
           <xs:element name="storage_format" type="xs:string" minOccurs="0"/>
           <xs:element name="import" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="is_attached" type="xs:boolean" minOccurs="0"/>
         </xs:sequence>
       </xs:extension>
     </xs:complexContent>
diff --git a/src/ovirtsdk/infrastructure/brokers.py 
b/src/ovirtsdk/infrastructure/brokers.py
index 3fb5954..dc17c3a 100644
--- a/src/ovirtsdk/infrastructure/brokers.py
+++ b/src/ovirtsdk/infrastructure/brokers.py
@@ -19,7 +19,7 @@
 ############ GENERATED CODE ############
 ########################################
 
-'''Generated at: 2015-01-16 20:21:11.000734'''
+'''Generated at: 2015-02-19 13:20:49.000671'''
 
 
 from ovirtsdk.xml import params
@@ -13280,10 +13280,11 @@
 
         return Host(result, self.context)
 
-    def get(self, name=None, id=None):
+    def get(self, name=None, all_content=None, id=None):
         '''
         [@param id  : string (the id of the entity)]
         [@param name: string (the name of the entity)]
+        [@param all_content: true|false]
 
         @return Hosts:
         '''
@@ -13295,7 +13296,7 @@
                 return Host(
                     self.__getProxy().get(
                         url=UrlHelper.append(url, id),
-                        headers={}
+                        headers={"All-Content":all_content}
                     ),
                     self.context
                 )
@@ -13306,7 +13307,7 @@
         elif name:
             result = self.__getProxy().get(
                 url=SearchHelper.appendQuery(url, 
{'search:query':'name='+name}),
-                headers={}
+                headers={"All-Content":all_content}
             ).get_host()
 
             return Host(
@@ -13319,12 +13320,13 @@
         else:
             raise MissingParametersError(['id', 'name'])
 
-    def list(self, query=None, case_sensitive=True, max=None, **kwargs):
+    def list(self, query=None, case_sensitive=True, max=None, 
all_content=None, **kwargs):
         '''
         [@param **kwargs: dict (property based filtering)]
         [@param query: string (oVirt engine search dialect query)]
         [@param case_sensitive: boolean (true|false)]
         [@param max: int (max results)]
+        [@param all_content: true|false]
 
         @return Hosts:
         '''
@@ -13333,7 +13335,7 @@
 
         result = self.__getProxy().get(
             url=SearchHelper.appendQuery(url, 
{'search:query':query,'case_sensitive:matrix':case_sensitive,'max:matrix':max}),
-            headers={}
+            headers={"All-Content":all_content}
         ).get_host()
 
         return ParseHelper.toCollection(
@@ -16795,6 +16797,27 @@
 
         return StorageDomain(result, self.context)
 
+    def isattached(self, action=params.Action(), correlation_id=None):
+        '''
+        @type Action:
+
+        @param action.host.id: string
+        [@param correlation_id: any string]
+
+        @return Action:
+        '''
+
+        url = '/storagedomains/{storagedomain:id}/isattached'
+
+        result = self.__getProxy().request(
+            method='POST',
+            url=UrlHelper.replace(url, {'{storagedomain:id}': self.get_id()}),
+            body=ParseHelper.toXml(action),
+            headers={"Correlation-Id":correlation_id}
+        )
+
+        return result
+
 class StorageDomainDisk(params.Disk, Base):
     def __init__(self, storagedomain, disk, context):
         Base.__init__(self, context)
diff --git a/src/ovirtsdk/xml/params.py b/src/ovirtsdk/xml/params.py
index e614608..782fee8 100644
--- a/src/ovirtsdk/xml/params.py
+++ b/src/ovirtsdk/xml/params.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 
 #
-# Generated Fri Jan 16 20:21:10 2015 by generateDS.py version 2.12a.
+# Generated Thu Feb 19 13:20:48 2015 by generateDS.py version 2.12a.
 #
 
 import sys
@@ -16384,7 +16384,7 @@
 class StorageDomain(BaseResource):
     subclass = None
     superclass = BaseResource
-    def __init__(self, actions=None, href=None, id=None, name=None, 
description=None, comment=None, creation_status=None, link=None, 
data_center=None, type_=None, status=None, master=None, storage=None, 
host=None, format=None, destroy=None, available=None, used=None, 
committed=None, storage_format=None, import_=None):
+    def __init__(self, actions=None, href=None, id=None, name=None, 
description=None, comment=None, creation_status=None, link=None, 
data_center=None, type_=None, status=None, master=None, storage=None, 
host=None, format=None, destroy=None, available=None, used=None, 
committed=None, storage_format=None, import_=None, is_attached=None):
         super(StorageDomain, self).__init__(actions, href, id, name, 
description, comment, creation_status, link, )
         self.data_center = data_center
         self.type_ = type_
@@ -16399,6 +16399,7 @@
         self.committed = committed
         self.storage_format = storage_format
         self.import_ = import_
+        self.is_attached = is_attached
     def factory(*args_, **kwargs_):
         if StorageDomain.subclass:
             return StorageDomain.subclass(*args_, **kwargs_)
@@ -16431,6 +16432,8 @@
     def set_storage_format(self, storage_format): self.storage_format = 
storage_format
     def get_import(self): return self.import_
     def set_import(self, import_): self.import_ = import_
+    def get_is_attached(self): return self.is_attached
+    def set_is_attached(self, is_attached): self.is_attached = is_attached
     def hasContent_(self):
         if (
             self.data_center is not None or
@@ -16446,6 +16449,7 @@
             self.committed is not None or
             self.storage_format is not None or
             self.import_ is not None or
+            self.is_attached is not None or
             super(StorageDomain, self).hasContent_()
         ):
             return True
@@ -16510,6 +16514,9 @@
         if self.import_ is not None:
             showIndent(outfile, level, pretty_print)
             outfile.write('<%simport>%s</%simport>%s' % (namespace_, 
self.gds_format_boolean(self.import_, input_name='import'), namespace_, eol_))
+        if self.is_attached is not None:
+            showIndent(outfile, level, pretty_print)
+            outfile.write('<%sis_attached>%s</%sis_attached>%s' % (namespace_, 
self.gds_format_boolean(self.is_attached, input_name='is_attached'), 
namespace_, eol_))
     def exportLiteral(self, outfile, level, name_='StorageDomain'):
         level += 1
         already_processed = set()
@@ -16571,6 +16578,9 @@
         if self.import_ is not None:
             showIndent(outfile, level)
             outfile.write('import_=%s,\n' % self.import_)
+        if self.is_attached is not None:
+            showIndent(outfile, level)
+            outfile.write('is_attached=%s,\n' % self.is_attached)
     def build(self, node):
         already_processed = set()
         self.buildAttributes(node, node.attrib, already_processed)
@@ -16669,6 +16679,16 @@
                 raise_parse_error(child_, 'requires boolean')
             ival_ = self.gds_validate_boolean(ival_, node, 'import')
             self.import_ = ival_
+        elif nodeName_ == 'is_attached':
+            sval_ = child_.text
+            if sval_ in ('true', '1'):
+                ival_ = True
+            elif sval_ in ('false', '0'):
+                ival_ = False
+            else:
+                raise_parse_error(child_, 'requires boolean')
+            ival_ = self.gds_validate_boolean(ival_, node, 'is_attached')
+            self.is_attached = ival_
         super(StorageDomain, self).buildChildren(child_, node, nodeName_, True)
 # end class StorageDomain
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8dbd4fc24ac5c0da2abcc0e7a7cff34ab92213a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: sdk_3.5
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to