mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
inline trivial calc url method
This commit is contained in:
parent
b70845bb40
commit
8b9c4de3b0
1 changed files with 4 additions and 9 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue