Skip to content

Commit

Permalink
Fixing error messages for requests with missing or invalid automate_w…
Browse files Browse the repository at this point in the history
…orkspace.
  • Loading branch information
pkomanek committed Oct 18, 2018
1 parent 51209ff commit 4d0b89b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/manageiq_automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def url(self):
The url to connect to the workspace
"""
url_str = self._module.params['manageiq_connection']['automate_workspace']
if url_str is None:
self._module.fail_json(msg='Required parameter \'automate_workspace\' is not specified')
return self._api_url + '/' + url_str


def href_slug_url(self, value):
"""
The url to connect to the vmdb
Expand All @@ -90,6 +91,8 @@ def get(self, alt_url=None):
url = self.url()

result, _info = fetch_url(self._module, url, None, self._headers, 'get')
if result is None
self._module.fail_json(msg=_info['msg'])
return json.loads(result.read())


Expand Down

0 comments on commit 4d0b89b

Please sign in to comment.