* Use inspector_url when creating a fake client for ironic inspector client
* Add a session and a url for designate fake client
Change-Id: I9cc78df13d0f0715538bbdb76c8ccad273bd2033
They were removed from cinder api see https://review.opendev.org/#/c/658318/
also move to cinder v3 (v2 is deprecated)
Change-Id: I35dd5927465152bb70822638bbaf7573db1220f1
Using a dict is not guaranteed to work (and actually doesn't with
ironicclient 3.0.0, although a few other things are broken with it).
Change-Id: I59c113b22c60f04e89a631ade8039c4fa62933dc
* Module designateclient.v1 doesn't exist anymore after
python-designateclient 3.0.0 is out. The new client
requires a keystone session so all other parameters
were dropped. Since this service now requires a
a session the generator test now mocks the method
_get_fake_client() for this action.
* Minor style changes.
Change-Id: Ida722828e3f1481e08f52257405ddfa2175733fa
We can't do run senlin actions because have an error when
init client senlin. We need an other way to init client to
run client with cron trigger and manual.
Change-Id: I294d18b341a3c7dd0df9c24588540f9c94dd4562
Closes-Bug: #1843178
Some OpenStack services have a discover_version method [1]
that returned a most recent version supported by API
and client. Mistral should use this method rather than
hardcode API version (manilaclient was done).
[1] https://github.com/openstack/python-novaclient/blob/master/novaclient/api_versions.py#L250
Change-Id: I0459206be5cc390853b9c69e8c5002568d1efa60
The HTTPClient for Ironic is deprecated and will be removed in Stein.
Use the SessionClient for Ironic actions instead. Also uses
endpoint_override param instead of endpoint, as that is also
deprecated.
Change-Id: Ida3b502b25887ec9a7b51c4d6497699cc9466f05
This removes the parameter insecure in the client creation as this
no longer exists in the client. It also changes the client class
to be called as other clients in openstack using sessions
Change-Id: I3cb7ed4255f8996b8bfd9a3e1edba6de50f4e492
Closes-Bug: #1800819
The new openstacksdk mechanism forces a keystone request to find info
about endpoints. We don't need this for fake client, so skip the
__init__ of the class.
Change-Id: I5b0d89ac57c14f982a6afa638f088d365e0e4ab8
Magnum client instantiation does not need the user_id parameter
coming from the context to do the operations.
Change-Id: I70070aee03671bf04ba4b933039b2c3fbf07c16f
Closes-Bug: #1786480
There are still some hardcoded v2 authentication in barbican actions.
This api has been deprecated and removed, so we can change it to use
instead v3. It also removes the version number from some helper methods.
Change-Id: I0390daf841463d11cb7c61653897949989b6e6eb
Closes-bug: #1783316
Add ZunAction for zun. Zun is an OpenStack Container service. It aims to
provide an API service for running application containers without the
need to manage servers or clusters.
Change-Id: Ibbe4777528b5af6fdb3a6c2ed3345f8f9c804bef
Signed-off-by: pengdake <19921207pq@gmail.com>
ceilometer api and client have been deprecated for over
two releases and now removed completely. Lets drop these
actions and update the requirements.
Change-Id: Ica2b835a885b9b4705996f91080afc12587bd314
The swift actions are not working. Need to pass the preauthurl to the
client with the actual swift endpoint.
Change-Id: I991f91c4dace8d82a7b3204b039c080b8399f63b
Update the following OpenStack clients to use sessions in their actions
Nova
Neutron
Keystone
Glance
Cinder
Heat
Also removes some extra code from Zaqar and Swift client creation.
Change-Id: Ifa24d914a0b3266eb3f18dcb2a26ce73902c55e3
This has been deprecated long ago, and will be removed really soon.
Create a Token authentication, build a Session and pass it instead.
This reflects how a session was created with auth_token inside the
client previously.
Change-Id: I3ce2916872b6ba4c36d4d6f294456454eee78314
Use the configured API host and port for the mistal URL, which defaults
to 0.0.0.0 and 8989,
Change-Id: I154b3dc174a9c40887729bb3f8866d5c2316cd12
Closes-Bug: 1709677
Recently novaclient moved to keystoneauth. When a token is passed to it,
an instance of Token auth plugin is used to handle it. The problem is
that it tries to reauthenticate using the token. It is not possible
with trust-scoped token.
Here we centralize the session establishment for service client creation
in most actions that enables the reuse of the existing token.
Change-Id: Ibe9ee28a027e7a782adb8d8120d745259c4608da
Co-Authored-By: Andras Kovi <akovi@nokia.com>
Closes-Bug: 1690787
The mistral action had a strange conditional where it would only
retrieve the endpoint when trust tokens are used, and otherwise rely on
the client to do so. It seems to make more sense to do it all the time,
especially for services which uses trust tokens to talk to Mistral (eg
Heat).
Change-Id: If37162f7df59978dc511d0e920e952fb954ba10f
A new config item 'modules-support-region' is introduced to be used by
cloud operators, mistral will decide if add 'action_region' param to
openstack service action inputs according to that config.
Fixed an action definition for tempest tests.
TODO: Add release note.
Implements: blueprint mistral-multi-region-support
Change-Id: I0b582e9f81ab72cd05f4fae592c568f38dec6e00
The import of python-muranoclient is causing mistral-db-manage populate
to fail. This patch fixes the try import to log and print to stdout the
modules that fail and allow other imports to continue.
Change-Id: Ied643a6173f40141fea59e5ab6e0df26b53d33f5
Partial-Bug: #1659663
The baremetal inspector client does not take the "insecure" argument. It
was incorrectly added in 600dd47654.
This is currently breaking TripleO.
Closes-Bug: #1656692
Change-Id: Ic1f55e9a243302d4d2715654b4d9d4abe5000d2a
New Insecure flag inroduced for openstack actions. With that mistral
is able to connect to https clouds without verifying server certificate.
Change-Id: If7839ac586ff0b50f3f323a6bd42349eb0c25ca8
Due to how microversioning works in the Ironic client, it is not possible
to use API features introduced in API version 1.10 and later from Mistral,
as the default version is 1.9 (mid-Liberty). This change bumps the required
API version to 1.22 (Newton final).
See the following link for the full API version history:
http://docs.openstack.org/developer/ironic/dev/webapi-version-history.html
Change-Id: I1c605fc00efe5fe8956d6547ea5e85e6e1172c9b
This change adds caching for all the actions. When an action request
is made, the cache is checked to see if a client has already been
created. If an existing client is found, the keystone token expiration
is verified to still be current within the configurable window. Once a
client's token becomes invalid a new client is created and the cache
is refreshed.
The new configuration option for setting the token expiration window
is expiration_token_duration present in the default section.
Change-Id: I854f0251d9ec3623700d8a4025df8f1bc632a3e9
python-ironic-inspector needs an actual session when creating the
client, since it will try to fetch and furtherly validate the given
version regardless if a version is explicitly given. This fetching
and validation do calls to keystone which require credentials. Thus,
I'm using mistral's service credentials to fetch the required info.
Change-Id: I908552d2fb8ab4a5a3593f03f92ee6a31b672034
When populating the ironic-inspector actions, the client code tries
to get a proper version (since none was given). And thus, in that
code it may fail if inspector is not listening on localhost (which is
what it tries to access by default). By setting the version in the
_get_fake_client call, we avoid this call.
Change-Id: I34d4739392a0d7c2967c1bc4ebf24d7ff5a56ab3