Juan Hernandez has uploaded a new change for review. Change subject: sdk: Calculate singulars correctly ......................................................................
sdk: Calculate singulars correctly There are a few places in the code generator where the singular form of words is calculated directly removing the last character, assuming it will be an "s". This isn't correct, as there are exceptions. The correct way is to call the StringUtils.toSingular() method. A previous patch fixed that in the code generator. This patch updates the generated code. That removes an incorrectly generated "SchedulingPolicie" class. Change-Id: I1c1a8665d9d49ac496ab13cea9ce08a45d906184 Related: https://bugzilla.redhat.com/1114655 Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com> --- M src/ovirtsdk/infrastructure/brokers.py 1 file changed, 15 insertions(+), 36 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/62/29762/1 diff --git a/src/ovirtsdk/infrastructure/brokers.py b/src/ovirtsdk/infrastructure/brokers.py index fe2e700..f0a0ae5 100644 --- a/src/ovirtsdk/infrastructure/brokers.py +++ b/src/ovirtsdk/infrastructure/brokers.py @@ -13163,42 +13163,6 @@ context=self.context ) -class SchedulingPolicie(params.SchedulingPolicie, Base): - def __init__(self, schedulingpolicie, context): - Base.__init__(self, context) - self.superclass = schedulingpolicie - - #SUB_COLLECTIONS - def __new__(cls, schedulingpolicie, context): - if schedulingpolicie is None: return None - obj = object.__new__(cls) - obj.__init__(schedulingpolicie, context) - return obj - - def __getProxy(self): - proxy = context.manager[self.context].get('proxy') - if proxy: - return proxy - #This may happen only if sdk was explicitly disconnected - #using .disconnect() method, but resource instance ref. is - #still available at client's code. - raise DisconnectedError - - def delete(self): - ''' - @return None: - ''' - - url = '/schedulingpolicies/{schedulingpolicie:id}' - - return self.__getProxy().delete( - url=UrlHelper.replace( - url, - {'{schedulingpolicie:id}': self.get_id()} - ), - headers={'Content-type':None} - ) - class SchedulingPolicies(Base): def __init__(self, context): Base.__init__(self, context) @@ -13325,6 +13289,21 @@ #still available at client's code. raise DisconnectedError + def delete(self): + ''' + @return None: + ''' + + url = '/schedulingpolicies/{schedulingpolicie:id}' + + return self.__getProxy().delete( + url=UrlHelper.replace( + url, + {'{schedulingpolicy:id}': self.get_id()} + ), + headers={'Content-type':None} + ) + def update(self): ''' @return SchedulingPolicy: -- To view, visit http://gerrit.ovirt.org/29762 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c1a8665d9d49ac496ab13cea9ce08a45d906184 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