New model manageiq manageiq provider (#28273)

* New Model manageiq manageiq_provider

* update docs, port is not required, region is provider-region

* add example of using token

* loop on endpoints instead of creating them one by one

* add alerts endpoint

* Simplify boilerplate and reorganize docs

Tried to make it clearer how the suboptions are laid out.

* Flatten out suboptions in order to make tests pass

These will not render properly in the HTML docs. Simplifying how this module accepts options should be addressed in a future PR.
This commit is contained in:
Yaacov Zamir 2017-08-30 05:54:35 +03:00 committed by Sam Doran
commit a41da28f3f
3 changed files with 546 additions and 17 deletions

View file

@ -88,7 +88,10 @@ class ManageIQ(object):
self._module = module
self._api_url = url + '/api'
self._auth = dict(user=username, password=password, token=token)
self._client = ManageIQClient(self._api_url, self._auth, verify_ssl=verify_ssl, ca_bundle_path=ca_bundle_path)
try:
self._client = ManageIQClient(self._api_url, self._auth, verify_ssl=verify_ssl, ca_bundle_path=ca_bundle_path)
except Exception as e:
self.module.fail_json(msg="failed to open connection (%s): %s" % (url, str(e)))
@property
def module(self):