In https://review.openstack.org/#/c/273653/ Bryan Jones made
a point about using mock_sleep.assert_not_called() rather than
self.assertFalse(mock_sleep.called), so let's make that change
throughout these tests.
Change-Id: I826d608836955383891b303355edcca7b62faa16
Allow the exception and error status
strings to be passed in such that other plugins can
make use of this function.
There is a comment in find_resource:
The exception to catch here is dependent on which
client library the manager passed in belongs to.
Eventually this should be pulled from a common set
of client exceptions.
Since I think that is a long ways off, this change will
work now and also work when a common exception is defined
and used.
Change-Id: Iab56cd1166028caed4f1e657e0b1ee81af3f48d8
For some apis, heat, the error status is "failed". This patch
changes the wait_for_status method to allow for the error
status to be passed in the same way as the success status.
Change-Id: I20db4051d3f5611a4b13fe23ea8798b82a40da81
Add a couple of tests for utils.find_resource() for the odd resources
and managers without resource_class.
Change-Id: I2ed9b491d1361b5259b3a5f80b4fac787a7087c1
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.
DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
This allows the server delete command to wait for the server to be
deleted (obviously).
The wait method is the same model that Tempest uses, i.e. wait for a 404
on server GET (successful deletion), fail if the server went to ERROR
status, or fail if a timeout is reached. The default timeout of 300
seconds is also what Tempest uses.
Closes-Bug: #1460112
Change-Id: I0e66c400903e82832944d1cad61e7eb30177c3e8
Add sort support to image list by sorting items in the client side.
The parameter syntax follows this spec[1].
[1] https://review.openstack.org/#/c/145544/
Change-Id: I42b487d18f00f937db1938daa46487cea2a896ab
Closes-Bug: #1410251
The unordered dict and lists causes variable results. The user
may see different results and tests can fail. Might as well make
this more consistent.
Change-Id: I7045b40b44cbf3ee0f2ca79c6ea0d279b6d8cfe3
The find_resource method had two hacks in in to support cinder
and keystone and I have removed those in favor of a monkey patch
for cinder.
The find_resource method used to attempt to UUID parse the id, but
it would do a manager.get anyway. I changed it to skip the UUID
parsing. This will make things run minorly faster and it supports
LDAP for keystone.
The find_resource used to attempt to use display_name=name_or_id
when finding. This was a hack for cinder support, but it breaks
keystone because keystone totally messes up with the bogus filter
and keystone refuses to fix it.
Change-Id: I66e45a6341f704900f1d5321a0e70eac3d051665
Closes-Bug: #1306699
So we can update requriements.txt. But fix a couple of easy ones:
* Fix E251 (1 occurrance)
* Fix E131 (1 occurrance)
Change-Id: I62aaa423aa6da9e9f0ca026ec586b51cc6a6df03
Most of the CLIs use a NoUniqueMatch, so produce a useful
error message if that happens. Added some tests for
find_resource as well.
Change-Id: I85ba61d5f6d1be5bd336a1cc4b02501492905f33
Closes-Bug: #1293846
* Add get_password method to the utilities
* Add --password-prompt option
* Call the get_password method if a prompt is requested
* Various tests
Change-Id: I1786ad531e2a2fbcc21b8bc86aac0ccd7985995a
Closes-Bug: 1100116