inline trivial calc url method

pull/31092/head
yaacov 7 years ago committed by René Moser
parent b70845bb40
commit 8b9c4de3b0

@ -123,15 +123,10 @@ class ManageIQTags(object):
self.resource_type = resource_type self.resource_type = resource_type
self.resource_id = resource_id self.resource_id = resource_id
self.resource_url = self.calc_resource_url() self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format(
def calc_resource_url(self):
""" Return the resource api url
"""
return '{api_url}/{resource_type}/{resource_id}'.format(
api_url=self.api_url, api_url=self.api_url,
resource_type=self.resource_type, resource_type=resource_type,
resource_id=self.resource_id) resource_id=resource_id)
def full_tag_name(self, tag): def full_tag_name(self, tag):
""" Returns the full tag name in manageiq """ Returns the full tag name in manageiq
@ -195,7 +190,7 @@ class ManageIQTags(object):
error=e) error=e)
self.module.fail_json(msg=msg) self.module.fail_json(msg=msg)
# check all entities in resoult to be successfull # check all entities in result to be successfull
for result in response['results']: for result in response['results']:
if not result['success']: if not result['success']:
msg = "Failed to {action}: {message}".format( msg = "Failed to {action}: {message}".format(

Loading…
Cancel
Save