Replace assignment of `Mock` objects to methods that are already mocked
in tests/unit/v1/test_image.py, tests/unit/v2/test_image.py
story: 2011459
task: 52210
Change-Id: I0a4644c27066c26cf0ee0f3613c174f141fe94ed
cliff is now smarter (I9155763eee15e19eab23b48989dfcc19ea2c5d34), so we
can effectively revert change I6b4f1b793dc383856bfdf9a01514381be3cd2bf1.
We bump the dependencies to ensure this.
Change-Id: I2af19043fd66b5be0826a774baeabeac7110a4aa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is allowed by the neutron API. Allow it in OSC.
Change-Id: I7642ecd686d11c5af9e11cc80896243e853e33f3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Add a Project ID column to the --all-projects tag of server list cmd
Differentiate from the basic command, add a column for Project ID
to facilitate easier identification.
Add test code for the Project ID column of --all-projects tag.
Change-Id: I12af2c91f934e7cd268d21cf76dda78646ed2ff4
When creating a user with the --password-prompt option, a warning is
incorrectly displayed stating that no password was supplied, even though
a password was entered. This occurs because the code checks parsed_args.password
instead of the password variable that actually stores the prompted password.
This patch fixes the issue by checking the 'password' variable
instead of 'parsed_args.password' in the warning condition. A test
case has been added to verify that no warning is displayed when
using --password-prompt and entering a password.
Closes-Bug: #2091836
Change-Id: Ib3ddc7e400ee7988f605c00db534bccc3617d982
This patch adds support for Nova microversion 2.99 which exposes the new
spice-direct console type and the pre-existing /os-console-auth-token/ API.
+----------+----------------------------------------------------------+
| Field | Value |
+----------+----------------------------------------------------------+
| protocol | spice |
| type | spice-direct |
| url | http://127.0.0.1:13002/nova?token=f78009fb-41ad-... |
+----------+----------------------------------------------------------+
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| host | 127.0.0.1 |
| instance_uuid | f2477018-aa93-... |
| internal_access_path | None |
| port | 5900 |
| tls_port | 5901 |
+----------------------+--------------------------------------+
Change-Id: I2d33646d6ac9b25076d69be76dcef8f5c465cd1b
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/940479
Restructure things to be a little more helpful. Also add a reference to
the Dockerfile we provide and remove an errant header that should have
been removed in change Ife108e6ae191641b56e872e4616a3f4ec78281e8.
Change-Id: I5f562a99ccee7db485b5d40ef4ea6f2e2e362c13
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This was still being used in places where we have our own API bindings
because SDK does not support the API. Those bindings should be returning
dicts, not FakeResource objects. Correct this, and in doing so fix the
bug this highlights in our cell-down output.
Change-Id: I6647d94fcf5ada8186edbf64c03abd3d8ae7ca56
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
None of these fakes are used anymore. Remove them.
Change-Id: I06721aa77f93b76b189901bbdc13a9825fe2fc3d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This allows us to remove get_servers, create_servers, and
create_one_servers.
Change-Id: I31a86b6333fdc3da1b54407f077873511260a5df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This change updates the server set state command to require confirmation
before it is applied. The same pattern as project clean is used and a
new --auto-approve flag is added to allow skipping the prompt.
Operators often use reset state in cases that are incorrect
this change updates the warning to be more explicit
about when and when not to use it.
Change-Id: Iab14739cf6043ad45ad49edff0580e81d75af2fd
The --project option of 'openstack keypair list' is supposed to filter
keypairs by a project but has not been working and instead returns
keypairs from all projects.
The reason appears to be because it uses a request for a user list
filtered by project but tenant_id/project_id is not a valid filter for
GET /users.
This fixes the issue by requesting role assignments for the specified
project and then requesting keypairs for users with a role in the
project.
This change depends on a recent openstacksdk bug fix change
Ic552dee83d56278d2b866de0cb365a0c394fe26a which fixed the user_id query
parameter for the compute /os-keypairs APIs. The bug fix was released in
openstacksdk 4.4.0.
Closes-Bug: #2096947
Change-Id: Ibb5757766e3040e58d64388b95678fab9b2b6f23
This doesn't make sense: SDK (and the server) will handle this for us.
Change-Id: I31b84e09eca0dc2bc5316d6727620346ae519512
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2106760
The 'show-instance-action-finish-time' blueprint [1] adds support for
showing 'finish_time' for InstanceAction object.
This change adds 'finish_time' as hidden column, so it doesn't fail
tests.
We need to remove this from hidden_column list, once all the changes
related to blueprint are merged and show the field only if microversion
is >= 2.101
This is a workaround for failing tests on patch [2], as per suggestion
from Stephen.
[1] https://blueprints.launchpad.net/openstack/?searchtext=show-instance-action-finish-time
[2] https://review.opendev.org/c/openstack/openstacksdk/+/930562
Implements: blueprint show-instance-action-finish-time
Change-Id: Ib9294a603daed0fdb936be128dfba254b9108799
Adds support for a new compute microversion that returns the
associated scheduler_hints in ``GET /servers/{server_id}``,
``GET /servers/detail``, ``PUT /servers/{server_id}`` and
``POST /server/{server_id}/action`` (rebuild) responses.
Change-Id: Ia5a4e0047b5123f2fb063cfc9ab1f58b2844308f