From 6eb96c1a56fec6557becec8ba822eeeb708243ec Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Wed, 10 Jun 2015 17:35:30 +0200 Subject: [PATCH] cloudstack: methods renaming --- v1/ansible/module_utils/cloudstack.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/v1/ansible/module_utils/cloudstack.py b/v1/ansible/module_utils/cloudstack.py index 973ce24f8e..ddb08e9f9c 100644 --- a/v1/ansible/module_utils/cloudstack.py +++ b/v1/ansible/module_utils/cloudstack.py @@ -75,8 +75,12 @@ class AnsibleCloudStack: else: self.cs = CloudStack(**read_config()) - # TODO: rename to has_changed() + # TODO: for backward compatibility only, remove if not used anymore def _has_changed(self, want_dict, current_dict, only_keys=None): + return self.has_changed(want_dict=want_dict, current_dict=current_dict, only_keys=only_keys) + + + def has_changed(self, want_dict, current_dict, only_keys=None): for key, value in want_dict.iteritems(): # Optionally limit by a list of keys @@ -334,8 +338,12 @@ class AnsibleCloudStack: return self._get_by_key(key, self.capabilities) - # TODO: rename to poll_job() + # TODO: for backward compatibility only, remove if not used anymore def _poll_job(self, job=None, key=None): + return self.poll_job(job=job, key=key) + + + def poll_job(self, job=None, key=None): if 'jobid' in job: while True: res = self.cs.queryAsyncJobResult(jobid=job['jobid'])