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 bba4612. Change-Id: I5a5d6acad255ebc96efd42e38b95ff7eca979c18 Signed-off-by: Juan Hernandez <[email protected]> --- M generator/src/main/resources/api.rsdl M src/ovirtsdk/api.py M src/ovirtsdk/infrastructure/brokers.py M src/ovirtsdk/xml/params.py 4 files changed, 111 insertions(+), 22 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/59/32759/1 diff --git a/generator/src/main/resources/api.rsdl b/generator/src/main/resources/api.rsdl index 4d44b6d..b0ba6fd 100644 --- a/generator/src/main/resources/api.rsdl +++ b/generator/src/main/resources/api.rsdl @@ -11686,10 +11686,34 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs" rel="add"> + <description>add a watchdog to the template identified by the given id</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>Expect</name> + <value>201-created</value> + </header> + <header required="false"> + <name>Correlation-Id</name> + <value>any string</value> + </header> + </headers> <body> <type>WatchDog</type> + <parameters_set> + <description>add a watchdog to the template identified by the given id</description> + <parameter required="true" type="xs:string"> + <name>watchdog.action</name> + </parameter> + <parameter required="true" type="xs:string"> + <name>watchdog.model</name> + </parameter> + </parameters_set> </body> </request> <response> @@ -11697,8 +11721,17 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs" rel="get"> + <description>get all the watchdogs for the template identified by the given id</description> <request> <http_method>GET</http_method> + <url> + <parameters_set> + <parameter required="false" type="xs:int" context="matrix"> + <name>max</name> + <value>max results</value> + </parameter> + </parameters_set> + </url> <body/> </request> <response> @@ -11706,12 +11739,28 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="delete"> + <description>delete the watchdog for the template identified by the given id</description> <request> <http_method>DELETE</http_method> + <headers> + <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/> </request> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="get"> + <description>get the watchdog identified by the id for a given template</description> <request> <http_method>GET</http_method> <body/> @@ -11721,10 +11770,30 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="update"> + <description>update the watchdog for the template identified by the given id</description> <request> <http_method>PUT</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> <body> <type>WatchDog</type> + <parameters_set> + <description>update the watchdog for the template identified by the given id with a new action and model as specified in the request data</description> + <parameter required="false" type="xs:string"> + <name>watchdog.action</name> + </parameter> + <parameter required="false" type="xs:string"> + <name>watchdog.model</name> + </parameter> + </parameters_set> </body> </request> <response> @@ -15751,6 +15820,7 @@ </request> </link> <link href="/ovirt-engine/api/vms/{vm:id}/watchdogs/{watchdog:id}" rel="get"> + <description>get the watchdog identified by the id for a given virtual machine</description> <request> <http_method>GET</http_method> <body/> diff --git a/src/ovirtsdk/api.py b/src/ovirtsdk/api.py index 197281c..27d8746 100644 --- a/src/ovirtsdk/api.py +++ b/src/ovirtsdk/api.py @@ -20,7 +20,7 @@ ############ GENERATED CODE ############ ######################################## -'''Generated at: 2014-09-03 18:27:07.000695''' +'''Generated at: 2014-09-10 14:16:23.000109''' import types import urlparse diff --git a/src/ovirtsdk/infrastructure/brokers.py b/src/ovirtsdk/infrastructure/brokers.py index 7d1a91a..2edd773 100644 --- a/src/ovirtsdk/infrastructure/brokers.py +++ b/src/ovirtsdk/infrastructure/brokers.py @@ -19,7 +19,7 @@ ############ GENERATED CODE ############ ######################################## -'''Generated at: 2014-09-03 18:27:07.000516''' +'''Generated at: 2014-09-10 14:16:22.000940''' from ovirtsdk.xml import params @@ -20360,24 +20360,34 @@ #still available at client's code. raise DisconnectedError - def delete(self): + def delete(self, async=None, correlation_id=None): ''' + [@param async: boolean (true|false)] + [@param correlation_id: any string] + @return None: ''' - url = '/templates/{template:id}/watchdogs/{watchdog:id}' - - return self.__getProxy().delete( - url=UrlHelper.replace( - url, - {'{template:id}' : self.parentclass.get_id(), - '{watchdog:id}': self.get_id()} - ), - headers={'Content-type':None} + url = UrlHelper.replace( + '/templates/{template:id}/watchdogs/{watchdog:id}', + {'{template:id}' : self.parentclass.get_id(), + '{watchdog:id}': self.get_id()} ) - def update(self): + return self.__getProxy().delete( + url=SearchHelper.appendQuery( + url, + {'async:matrix':async} + ), + headers={"Correlation-Id":correlation_id,"Content-type":None} + ) + + def update(self, correlation_id=None): ''' + [@param watchdog.action: string] + [@param watchdog.model: string] + [@param correlation_id: any string] + @return WatchDog: ''' @@ -20391,7 +20401,7 @@ result = self.__getProxy().update( url=SearchHelper.appendQuery(url, {}), body=ParseHelper.toXml(self.superclass), - headers={} + headers={"Correlation-Id":correlation_id} ) return TemplateWatchDog( @@ -20415,11 +20425,15 @@ #still available at client's code. raise DisconnectedError - def add(self, watchdog): + def add(self, watchdog, expect=None, correlation_id=None): ''' @type WatchDog: + @param watchdog.action: string + @param watchdog.model: string + [@param expect: 201-created] + [@param correlation_id: any string] @return WatchDog: ''' @@ -20432,7 +20446,7 @@ {'{template:id}': self.parentclass.get_id()} ), body=ParseHelper.toXml(watchdog), - headers={} + headers={"Expect":expect, "Correlation-Id":correlation_id} ) return TemplateWatchDog( @@ -20497,9 +20511,10 @@ else: raise MissingParametersError(['id', 'name']) - def list(self, **kwargs): + def list(self, max=None, **kwargs): ''' [@param **kwargs: dict (property based filtering)"] + [@param max: int (max results)] @return WatchDogs: ''' @@ -20507,10 +20522,14 @@ url = '/templates/{template:id}/watchdogs' result = self.__getProxy().get( - url=UrlHelper.replace( - url, - {'{template:id}': self.parentclass.get_id()} - ) + url=SearchHelper.appendQuery( + url=UrlHelper.replace( + url=url, + args={'{template:id}': self.parentclass.get_id()} + ), + qargs={'max:matrix':max} + ), + headers={} ).get_watchdog() return ParseHelper.toSubCollection( diff --git a/src/ovirtsdk/xml/params.py b/src/ovirtsdk/xml/params.py index 657c814..f3f465b 100644 --- a/src/ovirtsdk/xml/params.py +++ b/src/ovirtsdk/xml/params.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # -# Generated Wed Sep 3 18:27:05 2014 by generateDS.py version 2.12a. +# Generated Wed Sep 10 14:16:20 2014 by generateDS.py version 2.12a. # import sys -- To view, visit http://gerrit.ovirt.org/32759 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a5d6acad255ebc96efd42e38b95ff7eca979c18 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: sdk_3.5 Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
