Fix `openstack quota show --usage` to correctly display resource usage
and reservations by applying proper name normalization for corresponding
sections of data.
Previously, name normalization was applied only for "limits" which is
the root section, leaving 'usage' and 'reservation' sections untouched.
Change-Id: Id14fe894b30a74b9b8d78b00c3d4ff151f8b4210
Closes-bug: #2137636
Signed-off-by: Andriy Kurilin <andr.kurilin@gmail.com>
When using 'openstack image set --project <project> --accept <image>',
the command incorrectly changed the image owner. The --project parameter
when used with membership flags should only identify which member's
status to update, not change ownership.
Closes-Bug: #2136795
Change-Id: I1044b51f38000fb5339740bc40c7f8645c794402
Signed-off-by: Abhishek Kekane <akekane@redhat.com>
When a user is created without a password then no parameter called
'password' should be submitted to the keystone API. This removes the
incorrect 'password' with null being supplied.
Closes-Bug: 2136148
Change-Id: If1c2eb5db360764a5f7660ce4e5353da85b6d3da
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
In change I53d9058273748ecd4d4eecec5f7291d5f38ce5ab we added custom
Command classes for typing purposes. However, the Tap-as-a-Service code
merged around the same time and was missed. Correct this.
Change-Id: I3a9fe20b5b8eb54708644527538f27396f29b476
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Python 3.8 and 3.9 are no longer supported.
Refer to pyproject.toml for the current supported versions.
Change-Id: Ie7f917c26299509050294037cc27e1fd9c20e78b
Signed-off-by: Koya Watanabe <koywatan@lycorp.co.jp>
This will ensure we do not forget to ignore a module when migrating
plugins in-tree.
Change-Id: Id4dd657746f7c5f8ebf5ef55964593123303b996
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstackclient/+/970618
Even though the comment here attributed this to stevedore, it was in
fact the use of pkg_resources that changed things.
Change-Id: I35377dd7d773024aa6423b72b1412e11b1b6f2e4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change Ibe1cd6461d2cb78826467078aa17272f171746aa removed support for the
v1 volume API. We should have removed this check at the same time.
We also remove some god-awful monkey patching that references v1
cinderclient but in practice modified all clients.
Change-Id: I3727fd9238df966b3bc59812c5efcf3398da5c72
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We make a lot of use of typing.Any just to get this over the line. We
can come back to this later.
Change-Id: I03c18b0b44f210b2ad3e4012344d521fb85cae97
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These are effectively identical to the osc-lib variants except they
include the attributes that the OSC shell implementation will set on
this during shell init. This helps from a typing perspective.
Change-Id: I53d9058273748ecd4d4eecec5f7291d5f38ce5ab
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
No has used Initialize functions in years, while the _auth_required
attribute has long since been handled by the base class in osc-lib.
Change-Id: I3af9a6d8c339b2170a13346b009392d51e044443
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Instead of building fake test objects in the local fakes.py file,
use existing generate_fake_resource(s) factory methods to automatically
populate class attributes. Doing this ensures that fake objects are always
build with actual attributes of the class.
Change-Id: If424b87c79e7dab102cbd8a7938df85411c9465d
Signed-off-by: Miro Tomaska <mtomaska@redhat.com>
Take advantage of functionality recently introduced in cliff to allow us
to prefer commands that are in-tree over those provided via plugin
packages. This will allow us to move the extensions themselves in-tree.
Change-Id: I5dd9bc9743bea779ea1b4a71264c9a77c80033b3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
... to enforce maximum line length, to keep consistent code format.
Note that E501 check is disabled in test code now, until we decide how
to update ~50 lines violating the limit due to too long names.
Change-Id: I122c8b9035d6381dafb34438517c26b01e5201f5
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
Proposal to move all stadium projects from neutronclient
to openstackclient repo. Tap-as-a-service is the first example.
The tapas osc client code was recently moved to neutronclient see
https://review.opendev.org/c/openstack/tap-as-a-service/+/960849
but proposal is to make openstackclient its final destination.
This change also includes automatic lint fixes required in
this repo.
Change-Id: Ied47f40c6947600d40bf675ec06f0bf88fd15f1f
Signed-off-by: Miro Tomaska <mtomaska@redhat.com>
We cannot remove them fully, but we can remove a lot of them. Further
cleanup is needed here to remove the references but that will be done
once a version of osc_lib with fixes is included.
Change-Id: Ifd200bd3d3e5c02c239a8ad0e6cee6d823e26544
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change registered limit argument to plural and remove `id` suffix for
`registered limit delete` command. Also, note that service can be
specified by name or ID in help description.
Change-Id: I16950a5ac1a197761592304dcb71dcb09d608d78
Signed-off-by: 0weng <oweng@osuosl.org>
Just change all text to be as consistent as possible.
TrivialFix
Change-Id: I959cda9b0688f0fcec0f55ce4c8cadf209d3537f
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
This comes up in reviews frequently. Let's automate it.
Change-Id: Ia7ebd7cf29fe4550b22921e898bebaaa5f7bb4f6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We have a few instances of this. Settle on one.
Change-Id: Id115fea1c59ad75ec8e00d665e587020f7177a55
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We were incorrectly passing domain_id as a positional argument, causing
it to get picked up as the ignore_missing argument instead. Correct
this, fixing another bug where the look of projects or domains could be
forbidden by policy, in the process. The latter is unlikely to happen,
given endpoint lookup is typically an admin-only operation, but it's
better to be safe.
Change-Id: Idd3300040967d781b7743accd62298cb24c62872
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
UP is the exact name of the rule, instead of U. Use the exact name to
avoid potential problems caused by any UX rules which can be added
in the future.
Change-Id: I5fa59181fcd3e28bf3c87ce2a5e610561b2ee8a8
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
These are already found in osc-lib itself.
Change-Id: I51114a5a79d6cd6ea46f60284066132b2e54a1a5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This must have crept in some time after [1] merged.
[1] Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758
Change-Id: Ic0603db8b1a59b7704c51b0e0ffceb7db2e781d3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The 'role_assignments_filter' identity proxy method requires either a
user or group, which defeats the entire purpose of the command when used
with this option. Use 'role_assignments' instead.
Change-Id: I8fb705c55fb4e81fa82d4a7dbe4c5bf7e1edd98a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #1616104
Currently, running ``application credential show`` on a
non-existent appcred will exit normally and display a
formatted application credential with no data, despite
the Keystone API returning a 404.
Ensure that querying a non-existent application
credential raises an exception message and an exit-code
1 to the user.
Closes-Bug: #2126565
Change-Id: I597d2d4064f1020c5ac40862ecc556f3c94b53eb
Signed-off-by: Matt Anson <matta@stackhpc.com>
Per this Debian bug [1], 'openstack quota show --default' fails when
cinder is NOT installed. This is also true of other services.
[1] https://bugs.debian.org/1109288
Change-Id: I361da44b9f1d09ba3a454632d41e2110a3815395
Signed-off-by: Svein-Erik Skjelbred <svein-erik@skjelbred.com>
Signed-off-by: Thomas Goirand <zigo@debian.org>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
"openstack project delete" command doesn't try to figure out if
other services are using specified project somehow before trying
to delete it. This patch extends command description to ensure
that this is clearly communicated to users.
Related-bug: #2118900
Change-Id: I3ae0b2a8f04d4f791cab46ccd89f400549d24ecd
Signed-off-by: Alexey Stupnikov <aleksey.stupnikov@gmail.com>
Add file to the reno documentation build to show release notes for
stable/2025.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2025.2.
Sem-Ver: feature
Change-Id: I6aec2d1f91ed7fc2dba466574b4efb92b4bd7c88
Signed-off-by: OpenStack Release Bot <infra-root@openstack.org>
Generated-By: openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/add_release_note_page.sh
This change fixes missing conditional logic for microversion
2.100 which adds support for showing `scheduler_hints` field
to `openstack server list --long` output.
Change-Id: I2820e02a91deb73850f37dc737dbec79dea99e8d
Signed-off-by: Rajesh Tailor <ratailor@redhat.com>
Combine multiple test cases into a single test case, in order to
speed up execution.
Change-Id: Idcfd0c8c5b7418046601d222248c0cd16886e079
Signed-off-by: minkyukim <mj110602@gmail.com>
This change fixes missing conditional logic for
microversion 2.96 which adds `pinned_availability_zone`
field to `openstack server list` output.
Change-Id: I1e398bb3379fa6443b0a44db76baaf6241a945e7
Signed-off-by: Rajesh Tailor <ratailor@redhat.com>
Use sdk_fakes inside test_flavor. The only left fake is for
flavor_access, for which there is no resource in SDK.
Change-Id: I8fcfb734eb45308b80aa1478c2935c9881fee928
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This was inadvertently broken during the switch from novaclient to SDK.
Fix it for now but also deprecate it since it is an unnecessary alias.
Change-Id: Iaf136d82e00defc86e57ae4ea7e848246f2ade2c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2120833
This patch modifies the command to delete all metadef properties
inside a namespace. This operation can be called by `image metadef
property delete`
Change-Id: Iff9bda0dddfa157be0438a66d1d05da7b0b437c3
Signed-off-by: Mridula Joshi <mrjoshi@redhat.com>
Add support for the 'os_hash_algo' and 'os_hash_value' image attributes
added with Image API 2.7.
Change-Id: Id8fe6f3fecf77f537587e9088b207ef2077a9def
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
Add '--chunk-size' option to 'image save' command to control the size of
bytes to read at one time.
Change-Id: I0a02323384433010b8c6804a4337040acb13da8f
Signed-off-by: Hang Yang <hangyang@verizonmedia.com>
This is a meta command that can be easily achieved via some shell
scripting. We don't need it in OSC.
Change-Id: Ia3fc8d0458cb0c0dc4695347ef953028112a9c49
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Replace assignments of `Mock` objects to methods that are already
mocked in the class functions within test_server.py
Change-Id: I446632301c1b9f94545a0b8314e54e761d5d296f
Signed-off-by: dna <la18byeol@gmail.com>
Story: 2011459
Task: 52211
This patch adds operation which delete all metadef object inside a
namespace.
This can be implemented by `image metadef object delete`
Change-Id: Ib196e295aad1921d8bc0c451522e0ad530389134
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/901671
Signed-off-by: Cyril Roelandt <cyril@redhat.com>
Some Image attributes defined in openstacksdk are named differently
from actual properties managed by Glance. Because openstackclient
checked property names to be unset against Image object properties,
it was impossible to unset such properties.
This patch introduces a IMAGE_ATTRIBUTES_CUSTOM_NAMES dictionary
mapping real property names with custom attribute names.
Closes-bug: #2115732
Change-Id: I7296fc293dff9208464c9a07f58ce3e9ffabd3e9
Signed-off-by: Alexey Stupnikov <aleksey.stupnikov@gmail.com>
Include '--project' and '--project-domain' filtering options to the
'security group rule list'.
Closes-Bug: #1648317
Change-Id: I19e423906846073cfa1e45b4a295b3a8f5d11970
Signed-off-by: Alexey Stupnikov <aleksey.stupnikov@gmail.com>
We need a shim for consistency group support, which we may eventually
port to SDK but have not yet. Otherwise, this is rather straightforward.
Change-Id: Ic880b7a64cde2148c266d549c4768c669ba3f501
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/943800
The command line operation could never work due to the incorrect call of
the openstacksdk API. This is updated to make it work and report errors
back to the user.
Closes-Bug: #2116969
Change-Id: I87cc410853c03b00dd1549d67cb1b9a8145bcfaa
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
When listing volumes, the API provides metadata as a query parameter, but this feature is not implemented in the client code. So add parameter.
story: 2011487
task: 52446
Change-Id: I4bf66d4e073c86296fa96ee29c2b33d771e18293
Signed-off-by: ohjiwoo <jiwooo.oh@samsung.com>
The "openstack server create" with "--wait" args was priting an extra empty line character before the server ID.
This commit removes the extra empty line.
story: 2010947
task: 48984
Change-Id: Ib5ba1c9f23e7655ddfae0e5b644ed167ecd6485e
although python-openstackclient run command(image import) with invalid uri,
but the request succeeds. Fixed it to throw an exception
when requesting with an invalid URI.
unit test added. the test cover --uri 'invalid value'
Task: 52251
Story: 2011468
Closes-Bug: 2111777
Change-Id: I62cd8cdf054b6a5e07d664a543b0923ce5f20f83
Make better use of argparse and eliminate the need for a helper in the
process.
Change-Id: Ibdc9b4bfbb4d532ddb05bce9b49bcf0580cce76d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There is no "show" function in the "group" class of python-cinderclient. Instead, there is a "get" function, so I fixed it.
0125495f92/cinderclient/v3/groups.py (L134)
Closes-Bug: #2111539
Change-Id: If61d8cf115c9ff04d172d7344565e693774e7a21
When running `openstack server evacuate --wait`, the command would hang
indefinitely if the instance was originally in SHUTOFF state, because
only “ACTIVE” was treated as a successful completion. We now capture
the server’s status before evacuation and dynamically include
“SHUTOFF” in the `success_status` list if the instance was already
shut off. This ensures that a shutoff instance is accepted as a valid
completion without requiring manual intervention.
Unit tests have been added and updated to cover both:
- pre-evacuation ACTIVE → success_status=['active']
- pre-evacuation SHUTOFF → success_status=['active','shutoff']
Closes-Bug: #2103426
Change-Id: I86ad1cd173a144b16fde1dbac87819fab2d7a50a
This patch fixes a bug where the 'options' field was missing from
the output of the 'openstack user show' command since v7.0.0.
The issue was caused by the 'options' field not being included in
the column list in the _format_user function. This field is important
as it contains various user settings such as multi-factor authentication
configurations and password policy exemptions.
This patch:
1. Adds 'options' field to the column list in _format_user function
2. Updates all affected unit tests to include this field
3. Uses getattr() to safely handle cases where the options field may be absent
Without this fix, users cannot see important options like multi-factor
authentication settings through the CLI, which could lead to security
configuration issues being overlooked.
Closes-Bug: #2084946
Change-Id: I4319268ad4310e6164eb8e65664d73f9b32cdd78
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
Included resources:
qos_policy
qos_rule
qos_rule_type
Note: Parameters in unittests was modified
for compatibility with sdk
Change-Id: Iaa902d64ff1b29a07c28ed2100d437da506be475
This is no longer assigned to novaclient, meaning we can use it for SDK.
Change-Id: I43d9ede39d36cc29301f94fa462b9b9d9441807c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also update tests to use proper SDK fakes so we actually test this.
Change-Id: Ib98348cab613b7139f0faa0b5df90ff44353974f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
To ease migration of various commands from OSC to SDK.
Change-Id: I4645237e8808239e4d605f7f45138449c9439949
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
One has been introduced since Ie5907de8d60f2f39e98f6a88227cebb2e2ff565c
merged.
Change-Id: I37f7bf58a2cbecb69b370e832e56daa310cea3b6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The Cinder v1 API was removed in Queens [1]. Its replacement, the v2
API, has existed since Grizzly [2]. More importantly, the v1 commands
are implemented using python-cinderclient but support for the v1 API was
removed from python-cinderclient in Train [3], meaning none of these
have worked since then. Clearly if no one has noticed or cared in the 6
years or so since that happened, it's safe to say we can delete these
commands.
[1] 3e91de956e
[2] 75ca60f619
[3] 2189e5702b
Change-Id: Ibe1cd6461d2cb78826467078aa17272f171746aa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There is only one and it was never implemented. Remove the directory.
Change-Id: Ibfffe7936556a626b407deca0e8de17b45db5313
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The values of these dictionaries are not used when SDK is in use,
which should soon account for all use cases. Eventually we should
probably look for plugins to return a proper class or typeddict but
that's a job for another day.
This began as a fix for in openstackclient/object/client.py which
referenced a non-existent class and quickly snowballed.
Change-Id: I7b807ec3a97124b35828ffdecbb36f6fde11e7b5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
In [1], it was added the ability to print in the "port list" command
any field not defined in the hardcoded column set for this command.
But in [2], it was added a filter list in the API call in order to
reduce the CLI execution time. The unintentional drawback of this
optimization was that is no longer possible to print any field outside
the "port list" column set.
Because the optimization if preferred and it is always possible to use
"port show" to see all the port fields, the code added in [1] is
removed.
[1]https://review.opendev.org/c/openstack/python-openstackclient/+/522901
[2]https://review.opendev.org/c/openstack/python-openstackclient/+/754117
Closes-Bug: #2098980
Related-Bug: #1707848
Related-Bug: #1897100
Change-Id: Ia944b8e108c454219d642cfa595ffafdf060a57f
Quotas details returned from the Neutron service are in different format
then quota details returned from Nova and Cinder services. This patch
fixes helper function to convert data from Neutron to the same
format as data from Nova and Cinder is given.
Closes-Bug: #2102513
Change-Id: I18649f6c2ee179b64b7e605f4ea07d4b0c7a1635
The fix ensures that if a user wants to set a default project,
they must also provide the project domain. If it's missing,
an explicit error message is shown, making it clear that the
project domain is required.
Also adding some unit tests by modifying respective calls.
Change-Id: Ia6e921a53da55ab1bce85a42c8160872a9d47d64
Closes-Bug: #2102146
We may need to remove this soon enough, given the new Docker rate limits
that we keep bumping into.
Change-Id: Id4a9d8df770d107986b20e4a98835ee4e0b6117d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Add file to the reno documentation build to show release notes for
stable/2025.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2025.1.
Sem-Ver: feature
Change-Id: I2789e8605f5e9bae63382ca9e822bbc3e2241f36
the flag should store False to 'allow_failure', not True.
Also, make the --allow-failure and --disallow-failure flags
mutually exclusive.
Change-Id: I03699e14d4d69d9f08caab647293732fc211dbad
This change fixes missing space in help messages to make those
consistent and pretty rendering when calling help.
Change-Id: I947374821a4dbb5e68651c0e72fc5fd2f938e6a1
openstacksdk's Credential expects user_id and project_id, not user and
project. Previously, we would send payloads like
{'type': 'ec2', 'blob': '{"access": "s3-user1", "secret": "s3-secret1"}'}
which Keystone would reject with
'user_id' is a required property
Change-Id: I0544bef7df9247395f0726ea075112d6ac992252
In [1], the "port list --long" command received a new column, showing
the trunk subports related to a parent port. The problem of this patch
is that the ``_formatters`` definition, that is shared with the "port
show" command too, is changed. The "trunk_details" information presented
in both commands differ:
* In the "port list" command, only the subports are presented, in order
to print a list of dictionaries without showing the ``trunk_id``.
* In the "port show" command, it is presented all the trunk information,
including the ``trunk_id``.
This patch includes functional tests to validate the fix.
[1]https://review.opendev.org/c/openstack/python-openstackclient/+/926611
Closes-Bug: #2098950
Change-Id: Ib1107fb3dbb025b39a7c55f90f5fe51ae433a72f
The '--flavor' option appears in the usage and arglist but is not
actually parsed. The '--flavor-id' option is what is silently parsed.
Since the goal is to allow the name or the id, this adds the '--flavor'
option to being parsed.
Closes-Bug: 2091731
Change-Id: Id83facd3825f472e7d864427699bd072d1c08779
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
We need such temporary workaround until [1] in SDK will be merged, as
without that change here py{39,312}-tips jobs are failing on that SDK
patch.
[1] https://review.opendev.org/c/openstack/openstacksdk/+/939703
Related-bug: #1915151
Change-Id: Id39a6482de54fe78e26fa33c9252253886cf1f3d
Neutron API is accepting 'security_groups' field in
order to return the list of security_groups attached
to a port, but openstackclient is parsing the output
over a Openstack Port object that has security_group_ids
to map. This patch sends to the Neutron API the expected
field value and replace the output key to allow the
mapping just in case '--long' argument is passed.
Closes-Bug: #2095414
Change-Id: I188edc3c620ce29d7b16497ca24fd7d972a06618
creating the image is a 2step process, first an 'empty' image is created
and then the data is uploaded.
Currently the output of the 'image create' command is that 'empty'
image, in `queued` status etc.
A more user friendly approach would be to make a second refresh call
to show the user image as it is after data was uploaded.
Change-Id: I2f78b113dcc3c941f8cf8dd9b63262971a780a39
Currently the volume backup restore command returns with error
even though the restore is initiated.
This patch corrects the response received from SDK and processes
it in a human readable form.
Change-Id: I7f020631fbb39ceef8740775fd82686d90a6c703
Closes-Bug: #2063335
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/931755
For some reason we were setting a property mock on the FakeClientManager
class. In multiple places, no less. This has a nasty habit of causing
side-effects in other tests, depending on the order that tests run in.
Resolve this simply setting the attribute as we'd expect.
Change-Id: I8bf9055e3f5b885dd5a7a6d751b774934da4a7d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There is a flaw (IMO) in the design of Nova's os-quota-sets API: despite
project IDs forming the identifier for an individual resource, we get a
HTTP 400 (Bad Request) error if you pass an ID that does not exist,
rather than the HTTP 404 (Not Found) we would expect.
Correct this, noting why we're doing what we're doing for readers from
the future (hi!). Note that HTTP 400 is unfortunately quite broad and
means we'll also catch things like invalid requests but the exception
may have been translated so we can't rely on a string match.
Change-Id: I720502930d50be8ead5f2033d9dbcab5d99a37a9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2091086
By passing a dict instead of a single value, we force SDK to populate
the correct attribute on the object.
Change-Id: I9f4c5964dc0546215474c92db567966ffad68a1a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-bug: #2089821
Currently we have 2 issues with extending volumes checks:
1. We don't specify explicitly that MV 3.42 needs to be passed for
in-use volumes
2. Any state of volume (error, attaching, detaching etc) can pass
this check by specifying MV 3.42
The fundamentally correct approach to these checks should be:
1. Only allow 'available' and 'in-use' volumes to be extended
2. Check MV 3.42 or greater is specified in case of 'in-use' volumes
otherwise fail
This approach is implemented in the patch.
Change-Id: I45ab9af953f7d060379f48ca429eaea7cfe857cc
To allow users to create servers with no security groups associated with
the ports.
Change-Id: I91b1d9dd5c3fbba838640841d98341cd8ccb1b16
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
devstack no longer installs ceilometer services unlesss ceilometer
devstack plugin is enabled, so we can safely remove the options to
disable ceilometer services.
This allows us to remove references to removed services such as
ceilometer-api .
Change-Id: I4201878d0deba4490cf2a08bbabec8fe64474385
The datetime.utcnow() is deprecated in Python 3.12.
Replace datetime.utcnow() with
datetime.now(datetime.timezone.utc).replace(tzinfo=None).
Change-Id: Ic20174a9c6cacac05471fa57b105c1f784a73057
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
oslotest is not used anywhere, while requests is already a runtime dep.
Change-Id: I852b7d8664cddf22b1314b057c42930580a1f9f4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We only need to care about the unversioned tips jobs since [1] will take
care of the others.
[1] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/933197
Change-Id: I3d569dc496a995eee58fdbcf4a42a187143d1b24
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The sooner we have type hints in SDK, the better /o\
Change-Id: Iaf9596aea02f683c280ae68504a14d43dbd6134a
Closes-bug: #2077634
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Fix the wrong value assignment which made the --user-domain option
ignored. Unit tests are updated to verify usage of domain options to
avoid further regressions.
Also drop the redundant look up of domain id to avoid unnecessary API
call.
Closes-Bug: #2085604
Change-Id: I5112b8e831fb26eb6544615277f0d3fe4f15dc5a
Removing project from network_flavor_profile as neutron api
does not uses project.
Closes-Bug: 2046496
Change-Id: I77b0544cf8629fb0a5b9914361a007d28b2b5662
This is a fun one driven by two separate changes. We recently started
checking whether the volume service was available before setting quotas
in order to allow us to use quota set for other services [1]. This
merged a number of weeks ago and was included in 7.1.0. More recently,
we modified DevStack to stop publishing a service catalog entry with a
service type of 'volumev3', preferring instead to use the correct
'block-storage' service type. Taken separately, neither of these changes
would have caused issues. Together, they mean our lookups for the volume
service now fail and we can't set volume quotas.
Fix things by checking for the block-storage service type also. A future
change will raise a warning (later an error) if the volume service is
not found and you're attempting to set a quota since this is clearly a
mistake.
Change-Id: Ibbeef52225e18757cd28d0fbfb14c1ca06975b60
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2084580
When we show a volume backup by name, it calls the get_backup
method in SDK which is only used for getting a backup by ID.
This patch modifies the approach to call find_backup method
which first tries the find by ID and then find by name logic
eventually returning the backup details.
Story: 2011234
Task: 51127
Change-Id: I926d8de9810fcf2e5335bbe35aaab15e1e36a5cb
The --user-domain option and the --project-domain option may take id or
name. In case name is given it should be translated to id.
Closes-Bug: 2083390
Change-Id: Idf3f113a74452daabc80660574030cb9b24b1a15
Currently, it is passing None value which is not accepted by keystone
parameters validation:
BadRequestException: 400: Client Error for url: ... Invalid input for field 'enabled': None is not of type 'boolean'
Failed validating 'type' in schema['properties']['enabled']:
{'enum': [True, False, None], 'type': 'boolean'}
On instance['enabled']:
None
Closes-Bug: #2083021
Change-Id: Ia8772560deb54e71672102157659d4eb22e6ad59
In change I06f3848812bce60c65909f1311f36b70eba427d4, we migrated the
'user *' commands from keystoneclient to SDK. One side effect of this is
that we are no longer able to rely on keystoneclient's 'filter_none'
helper method that filters out parameters that are set to None. As such,
we now need to do this ourselves. Eventually, it would be nice if SDK
provided such functionality itself.
The same change also introduced a bug where the '--domain' argument was
being used to lookup a project rather than the '--project-domain'
argument. This is also corrected.
Change-Id: I1204ca611a74d134c879467d6c2b73f16e043213
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2080600
Asking for floating IPs on an undercloud results in a NotFoundException.
Make openstackclient handle it gracefully.
No test is added for this because it would need to be a scenario test -
deploying a cloud without the foalting IP extension loaded. I don't
think this edge case is worth an entire new job just to exercise it.
Change-Id: I73b544853376d98ab0dbb14e32fefc43c1a8a179
Story: 2006863
The name of the errors change and we need to move things around a
little, but it's otherwise a straight swap.
Change-Id: I0a19765ebeaa14c0534faa1542165b76ed2bf4e2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
With `openstacksdk` 3.2.0 the `host` attribute of an Instance got added
to the `Server` class [0]. With that change, listing servers with the `host`
attribute leads to a query-filter for `compute_host` as expected, but
`openstacksdk` will also filter for the `host` attribute locally after
the results are returned. Since `compute_host` being
`OS-EXT-SRV-ATTR:host` is not the same as `host, this means no results
are returned.
Since we want to keep the old behaviour of filtering by `compute_host`
i.e. the service host name, we need to switch to filter for
`compute_host`. This is already supported in older versions of
`openstacksdk`.
[0] 0f311ff3e2
Change-Id: I0cd32c5b7d6d4d21194f3efdcfb9b205dea6a91e
Closes-bug: #2074200
Add file to the reno documentation build to show release notes for
stable/2024.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.
Sem-Ver: feature
Change-Id: I5b2c70118df024dfc9236c7e1fa39554ffccf5e0
Well, mostly. We still keep our own flake8 hooks and the hacking hooks
enabled. Everything else can be handled by ruff.
Doing this enables a couple of hacking checks that were previously
unaddressed. It also highlights a few cases that flake8 missed. Both are
addressed.
Change-Id: If81c7055e9ef692425da2789bae18a96d04b104f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also drop the default language setting: everything is Python 3
nowadays.
Change-Id: I9dc9573a86c93416d1bbbc782dac76ecdda6effd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We changed these in change I37d07a6c5cdc98680b8d65d596521cad2b049500 but
the '-c/--column' option provided by cliff currently requires an
explicit match on column names. Change them back for now. We can revert
this when cliff is a little bit smarter.
Change-Id: I9180922e9da5c22ae3d8878946d1bf1ec4b8c6e1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2076212
We changed these in change Iba3fee2672d32266623c6f367beaabe84bd3d24e but
the '-c/--column' option provided by cliff currently requires an
explicit match on column names. Change them back for now. We can revert
this when cliff is a little bit cleverer.
Change-Id: I6b4f1b793dc383856bfdf9a01514381be3cd2bf1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-bug: #2076212
In the event that a user provides a hypervisor name rather than an ID to
the 'hypervisor show' command, passing 'details=True' (the default) to
'find_hypervisor' will ensure we get the detailed response we need.
However, this comes at the cost of retrieving reams of additional
irrelevant data for all the other hypervisors. Rather than doing this,
use a summary view and then a second call to fetch only the hypervisor
we care about.
Change-Id: I92b53802e41a962c6f916c3a111dc2de7c12d0fc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2072965
In SDK change I3bc3150877c6c00aa9ec4355104308d7755aa1d4, we modified the
'rebuild_server' proxy method to use a sentinel 'unset' value so that we
could distinguish between fields that were not being changed and those
that were being changed to 'null'. However, we are currently passing the
'admin_password' field to the 'rebuild_server' SDK proxy command
regardless of whether it is set or not. Resolve this conflict.
Change-Id: If7b7585aadd43cdc6d2a9358f14223e43dc21a73
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2076232
Unlike cinderclient, SDK attempts to connect to a service as soon as you
create a client. A keystoneauth1.exceptions.catalog.EndpointNotFound
exception can be raised if this service does not exist in the service
catalog. Avoid this for the quota and limits commands by first checking
if the service is enabled.
In the process, we rework the 'is_volume_endpoint_enabled' helper we are
using to check for the existence of the service to *not* require a
volume client, since this was causing a chicken and egg issue for us
(and was also pretty much unnecessary).
Change-Id: I56e68f00ea221d689eb7f668e9e5ffa7d1a20184
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2076229
When running project cleanup and using the --skip-resource flag, this
flag is only used during the --dry-run stage. This change ensures it is
also used when deleting the resources which fixes the bug mentioned below.
Closes-Bug: #2074109
Change-Id: I8e50fd14dcde069b932cc8ec4bb4fc809f7d2eb7
I have seen a few cases where import errors (distutils - I am looking at you)
result in an extension not being available, but there is no indication why this
is the case. We do configure logging, but this happens too late (as part
of the 'cliff.app.App.run' call to execute a command, which calls
osc-lib's 'configure_logging' but which happens long after we've tried
to import our plugins) to be of any use. Instead, make use of a callback
to make it more obvious.
Change-Id: Id68b06161e445b79fe43f463e06cda3c4771ef02
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This goes EOL in October. We don't want to be supporting it past then.
Drop it now.
Change-Id: I6166678a35092760718d4fcd0357e7195bbe8be0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We are testing this in CI and can support it going forward now. The
osc-tox-py310-tips job is removed in a favour of a new
osc-tox-py312-tips job.
Change-Id: I87a726cb65223cba9975d0505c13fe42dcd7fa14
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This isn't necessary and makes migration of the compute client a little
more difficult.
Change-Id: Ib07e60171c43838935ea30f4916bf68d54cdc944
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There are a few remnants left here but this is trivial to clean up now.
Change-Id: I517d906796338e64a31afa08b9ee6909b08e0115
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also ensure we call neutron rather than the deprecated nova proxy API
in the event that neutron is available.
Change-Id: I8315ea164fd3fa6c1d759f16677bfd6c24c4ef63
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is done for both the compute and block storage services. The
network service was already using SDK.
Change-Id: Id7a6943b8b4d7d1330e7d7f13705f027d1b67189
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/923864
This is really three separate commands rolled into one. Split the logic
up more to simplify it somewhat.
Change-Id: Ief3c3c413f791dda076f90e5ec76a033d3a9e12b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The existing default behavior has been deprecated for over a 18 months
(change I25828a3d68e2e900f498e17a0d01fb70be77548e). It's time for a new
default.
Change-Id: Iaf4fa931dcbf16c22933f63629c6a4d443ac5310
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This should have been added as a counterpart to the 'quota show
--default' option way back when we added that. Better late than never!
Change-Id: I0e3719e585353664fea6f23ec658a330086db3df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These are all deprecated for over 18 months (change
I0dd38e5cb252a01d5817ed168be040b21b35e348). It's time to remove them and
simplify this code.
Change-Id: I9ee3bfebbad21eec3eb1b475a813bcbc450edea4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ibdd329a6db8bd176af065d7f5190f0901d3c3f8d
This was incorrectly grouped as a general compute quota, when in fact
it's a nova-network quota. Move it.
Change-Id: If93c95bc181ab766137b61943a09821810345300
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These should have been cleaned up as we went but weren't. Fix things
now.
Change-Id: I80b29c0fd6e4f557c2efc45474279306f50c4fd7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
None of these are actually supported by openstacksdk (intentionally so)
so we add our own manual implementations.
Change-Id: Ifd24f04ae4d1e56e0ce5ba0afe63828403bb7a6f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The final step. Future changes will clean up the remnants of the
novaclient usage. This is a rather large patch, owing to the number of
things that novaclient was handling for us which SDK does not, but the
combination of unit and functional tests mean we should be handling
all of these differences.
Change-Id: I623e8c772235438a3d1590e1bbd832748d6e62ea
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Currently this check is handled by novaclient. In the future, we won't
have that so we need to do it ourselves. Do so now, fixing a typo along
the way and adding tests to prevent regressions.
Change-Id: Iaa9c087d846390b6a4f95ed3fa121dd8dc640903
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Migrate the following commands:
- 'server delete'
- 'server rescue'
- 'server unrescue'
- 'server resize'
- 'server resize confirm'
- 'server resize revert'
- 'server migrate confirm'
- 'server migrate revert'
- 'server remove fixed ip' ('server add fixed ip' was already migrated)
- 'server ssh'
That leaves a few commands to migrate, all of which are called out with
TODOs.
Change-Id: Idb769a93609da522c458e719bc69a63ff2ab107b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We can use a detailed list instead when looking up by name. We also
improve tests somewhat.
Change-Id: I18b38e7fbcac813190b304c4d67d8ea03d8c1a80
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This affects the 'server create', 'server show', 'server rebuild' and
'server set' commands. We also fix a few mistakes around the fields
shown.
Change-Id: I9946e12146efff39f9ba1591c90a4a9bccd46919
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We need to work around SDK's (intentional) lack of support for Nova's
deprecated '/os-security-groups' API but it's nothing too crazy.
Change-Id: I03ca1a73f98aa77b288148607baff336dae69fb1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This patch migrates the volume attachment create, get, list,
delete, update and complete commands to SDK.
Change-Id: Ib237d25cc1c3fc72946b9d088ff3447433162130
This beats the horrible mess of mocks we have created for ourselves.
Change-Id: I8af3ce0a0b10f52e2124ec86f306327ff3474982
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This was the sole outstanding command to be migrated to SDK. We also
clean up the old in-tree wrappers we have in the process and add missing
error checks for the 'host list' and 'host show' commands.
Change-Id: I5635469b63ab3370fb5118e4f8a1758002381aa5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These are not supported by SDK natively (intentionally so) so we use raw
HTTP requests to manage this migration.
Change-Id: I72fa0d6f87899537a24090995b1ba884bc5f9d4d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We use the compute client here to look up server IDs when filtering by
'device_id'.
Change-Id: I76515eaa4ce4e7c7d0173d2e0a91d7564ba7041a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is a little more realistic. We fix a minor bug along the way and
start ignoring some newly added create-only fields.
Change-Id: I93eae610e16e2a3a859f684b889546ace3afa683
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The incremental volume backup stopped working after we moved from
cinderclient to SDK[1]. This happened because SDK accepts the
``is_incremental`` parameter[2] rather than the ``incremental`` parameter
which is actually passed in the API request and was previously a valid
parameter for cinderclient.
This patch fixes the issue by passing the ``is_incremental`` field instead
of ``incremental`` from the OSC side which adds the ``incremental`` parameter
in the API request.
Request body after the fix:
'{"backup": {"name": null, "description": null, "volume_id": "<vol-id>",
"force": false, "container": null, "incremental": true}}'
[1] https://review.opendev.org/c/openstack/python-openstackclient/+/889748
[2] 10e5e20fc0/openstack/block_storage/v2/backup.py (L126-L134)
Closes-Bug: #2070080
Change-Id: I89bd3d2751267ec39f4dbd664b7873ab87a9ac6c
Additional paragraphs in a rST list should be indented by the same
number of characters as the first paragraph otherwise it renders as a
block quote. Correct this for the backwards incompatible changes guide.
Change-Id: I918c2a24aead4cc5a317201df9b12ce740612e5a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We don't need to transform one HTTP Forbidden-related error to another:
just use the original one. This also fixes an issue where we would end
up with an undefined variable (server_id) if a non-HTTP 403 exception
was raised, since that would be blindly ignored.
Change-Id: Icdd1764b6f2df4a635e3264ed8f93a115cc52ef2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #2062010
This patch adds the ``Cluster`` and ``Backend State`` columns to
the ``openstack volume service list`` command. Note that you need
to provide the appropriate microversion to show these columns.
Cluster: openstack --os-volume-api-version 3.7 volume service list
Backend State: openstack --os-volume-api-version 3.49 volume service list
Change-Id: Ie7727d0001307b5d5a40d7ea0348bdb9626f9e03
A previous change fixed a bug with the custom SG rule
flag, but did not add any tests to verify all the
combinations of default and custom SG flags. Let's
add them now.
Change-Id: Id74552346cfa975e3dd5eb45b8f621b365e88463
Related-bug: #2054629
This patch adds support for unmanaging a snapshot with
``openstack volume snapshot delete --remote`` command.
Change-Id: I3caf3471a007fcb988835d495727bbc5c66f42f8
This patch adds support for unmanaging a volume with the
``openstack volume delete --remote`` command.
Change-Id: Id71681e817f6e56b4ef553079f0bcfac8252d3cf
The simplejson library is not included by the requirements but it was
directly imported. Drop the direct inclusion and use the alias in
the requests library to avoid ImportError caused by missing simplejson
in the environment.
Also fix the missing requests library in requirements.
Change-Id: I8713f45c5f2717cc53ba043aaeb479e72f641f78
The ``volume backup list`` command does not show the
created_at column for backups which doesn't really
help the end-user since a critical part of a backup
is knowing when it was taken, and fast if there is
a rush doing recovery by restoring a volume from a
backup.
Change-Id: I8d8a7f36c468c9faa2c2c47bfa9ba9e1ca5b9858
This patch adds support for the cinder manage command to
bring a volume under OpenStack management.
Change-Id: I12b63bfc4f0c9bc29cf9d4efd9a5cd038ec00af3
This patch acts as a base framework to add the parameters needed
for manage volume support.
This includes 2 changes:
1. Move get_parser and take_action code to common methods which
can be utilized by both v2 and v3
2. Make _check_size_arg as a static method and move it inside
CreateVolume class since it's not used by other classes.
[2] was initially thought to be a follow up change but since we
are implementing changes into the _check_size_arg method for v3,
it makes sense to just include it in CreateVolume class to avoid
adding a new additional method. Similar changes are done for v2
as well.
Change-Id: I9315e457ebd6c5ba4cc67452f92c9dc8c139ee3c
We were seeing the following test failures on Python 3.12:
openstackclient.tests.unit.common.test_module.TestModuleList.test_module_list_all
openstackclient.tests.unit.common.test_module.TestModuleList.test_module_list_no_options
Both failures were caused by missing attributes of 'sys', e.g.
AttributeError: module 'sys' has no attribute 'builtin_module_names'
Fix this by exposing the real 'sys' module as part of our mock of
'sys.modules'.
Change-Id: I17391a46f08896f49dccaf75ad685dab1375a03d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Another day, another useful hook. We also ignore the preceding patch
that actually did the work, renaming the incorrect named file in the
process.
Change-Id: I412827761fbdeb36702ebaf5c1b727c62e629299
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We've seen an ordering issue pop up occasionally in the CI. Resolve it.
Change-Id: I4dd10268b673c260ac0894fac92cd8bea9e626f4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').
We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.
Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Most of these skips were unnecessary. The few that did generate warnings
could be skipped.
We also set 'skip_install' since there's no reason to build the package
for linting purposes.
Change-Id: I9644e5c19720b9c41c60e0a5882b7cd7f6a71f7b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Let's us test with specific Python versions. We also merge the
'functional-tips' target in.
Change-Id: I08e1b3e2f4be57aec0c1cd01274d86dfec769666
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We have seen users interpret the current output ('Complete') of
'server migrate --wait' as if it meant success as well and be surprised
when later they learned that the migration was complete and failed.
This change adds a pointer to the that output, how to actually check the
success/failure of a migration, hoping to eliminate this user confusion.
Change-Id: I09030705a39405366d6202a5ac743cc4d1ddd63c
The '--retype-policy' option is used in the 'volume set' command to
specify the migration policy during the retype operation. The
'--retype-policy' option does not convey the correct meaning of its
usage. The migration policy determines whether we are going to perform
the migration in the retype operation or not and is not related to the
actual retype which just changes the volume type of the volume.
Change-Id: I2ea8fd3f5277bb3422ccae915d05e8ad44ff1912
This ensures we are speccing the identity proxy API, as we did
previously for other services.
Change-Id: I4d090bab001f9b7e1d83ca8fee9e7e1117844cd8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: I13bb45d30d3dff73ca48ad8a2ed8bdc982b62d86
When using the "openstack image cache clear" command, the "clear_cache"
method from the OpenStack SDK is used. It expects its only argument to
be one of "both", "cache" or "queue". However, when passing neither
"--cache" nor "--queue", it is currently passed None as a value. Fix
this by specifying "both" as the default value to be passed.
Change-Id: I17c6e3d435a84b4ba453845086ff3fe272b54f58
This change implements the logic to call the new API for managing
external gateways.
Relevant Neutron core change:
https://review.opendev.org/c/openstack/neutron/+/873593
Co-Authored-by: Frode Nordahl <frode.nordahl@canonical.com>
Related-Bug: #2002687
Change-Id: Ib45f30f552934a0a5c035c3b7fadfc0d522219ba
The variable already takes multiple values, let's make it obvious
just by reading the code.
Related-Bug: #2002687
Change-Id: I294ee710d989d7a3a54331fca424e84708a2faab
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
This is to prepare for subsequent patches that will add support
for managing multiple gateways.
Related-Bug: #2002687
Change-Id: Ic088dca0b7cd83bd7568d775b4e70285ce72411d
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
Currently the Default setting for CustomSG Rule
is set to True, this means all new SGs inherit
these rules, with no way for user to override
this behavior.
Closes Bug: #2054629
Change-Id: Icef7c91654dbced76a5492437e723c4e2a0f3102
This patch adds a command "image metadef object property show" which
describe a specific metadata definitions property inside an object.
Change-Id: I738e2e3c27c9819290d5a2a8781878b81f03b5f9
When using table output format, the dns_nameservers field
of a subnet is sorted, but it should not be as the order
is important.
Created an UnsortedListColumn() class in subnet.py so the
output is correct.
Updated the unit test accordingly to verify the order is
correct when an entry is removed.
Change-Id: I60a15a944f83549738305dd025db38ff8e165be7
Closes-bug: #2053201
This patch adds a command "image metadef object update" which
update metadata definitions object inside a namespace.
Change-Id: I2dd8f54f9224abda5adc7a1b6a1c270c49d473a7
An openstacksdk 'find_foo' proxy method will return None by default if a
resource is not found. You can change this behavior by setting
'ignore_missing=False'. We were doing this in most, but not all cases:
correct the issue.
In the event of calling 'image delete' with multiple images, it will no
longer fail on the first missing image and will instead attempt to
delete remaining images before failing.
Change-Id: I1e01d3c096dcaab731c28e496a182dd911229227
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Mostly stylistic, with the exception that we now allow deleting multiple
metadef properties in a given namespace.
Change-Id: Ib0c243f0d647ce74c0165ee666beed6eb5d5c5a7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also migrate to the native hacking pre-commit hook.
Change-Id: Idb5a825c20cb7f189997a4d6c3a9a88218fdb335
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This reverts commit 860d636047.
Reason for revert:
The issue with aodhclient and latest pyparsing was fixed by [1].
[1] 3a36ed1774ba0bbb3ad6a3716c6c014246bc9613
Change-Id: I461edafc5be7b3afbde485f1620bff71e178b078
The TripleO project has been deprecated and its master is no longer
maintained. The complete project retirement is now on-going.
Change-Id: If7b390fc2230c16ef138ceb4a7bc5d97dcf790e6
Rather than excluding the few fields we don't want, explicitly indicate
the ones we do want.
Note that this is a problem in the tests for virtually all commands
that will be seen as the SDK continues to evolve and new fields are
added to existing resources.
Change-Id: Ia8d487e1e7804fa177fce46497c0202aed8acb08
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg
Change-Id: Ic137b2eecee65d43afeca2c936e195a8652237af
The --use-prefix-delegation argument when creating a
subnet should not take an argument of True/False, it
should simply trigger the code to set subnetpool_id
value to 'prefix_delegation'. Change action to correct
this.
Added unit test to cover missing checks.
Related-bug: #2028159
Change-Id: Ib7ee80100327b8611d4a354c7f4eb0e696c953da
This patch adds a command ``image member get`` which displays
a particular member associated to the image.
Change-Id: I48d3151f8e204e1eb5cfff67ce1e333d1cfb9322
These only apply to newly created default security groups i.e. when you
create a new project. They do not apply to existing default security
groups.
Change-Id: Ie01bf47dd8a0392354d17d984b41c1fad504e659
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The snapshot commands use the "volume " prefix which was missing
from the doc. This patch adds it.
Change-Id: I2acf28eff78fb8419a4c4f00395355a6ca44a576
there are two problems currently:
- SDK's `availability_zones()` returns a generator that raises errors
only when actually accessing its items
- the error raised is the sdk exception, not nova one, and thus is not
being handled correctly
As a result, currently nova AZs can not be listed by non-admins.
Story: 2010989
Task: 49220
Change-Id: Ia299faea85857d3fc3a9b539800f3483f84ccbc0
Currently 'openstack volume list' calls nova to resolve server UUIDs
to server names. This is not required if:
1. no volume is attached to an instance
2. no volume exists in deployment
This patch fixes this by checking volume statuses and, if any volume has
status 'in-use', we will call nova to resolve server names.
Note that we don't check for 'reserved', 'attaching', 'detaching'
states since those are transition states and doesn't guarantee that
the volume is actually attached to the instance.
Change-Id: Ic4d89db69244d3fba44d4b69c79b3e7632ee3d53
After setting a default dns_domain on a network
openstack net set --dns-domain 'example.com.' <NETWORKID>
the setting could not be reverted back to an empty string using
openstack net set --dns-domain '' <NETWORKID>
and the call also does not emit any error.
The same is true for the description of a network.
Reason was using the parsed argument directly as a condition instead of
comparing against None -- dropping the empty string as valid value.
The name parameter already accepted an empty string.
This change also adds a testcase for dns_domain, description and the
network name parameter, checking if the empty string is forwarded.
Change-Id: Ia7b9738205002b028c19e4f397411c86469cba1a
Some tests still assume extensions are enabled; those tests are now skipped if the extension is not enabled. Change I25b8811fe09f2a4a9fc20ca5459f5a404b88a337 addressed some but not all of these.
Change-Id: If36550650f143a7efe4190e60961c51a8cd20fb3
If there are no agents with type=dhcp, the neutron-dhcp-agent service is
likely not enabled on the deployment.
Change-Id: I1253f35e71cf996c559f2a2d8d1d8cde6b41a519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Our functional tests are inherently dependent on 'clouds.yaml' files.
The presence of 'OS_*' environment variables can cause weird test
failures. Simply don't pass them through to our test environment.
Change-Id: I7d24cdff5f1f5798118816b12d7398b87a5f5ed4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
If you use the former, you get a pretty error message when there's a
failure. If you use the latter, you get an ugly traceback when used with
the '--debug' flag.
Without this change:
$ openstack flavor create ... --property '' foo
...
Traceback (most recent call last):
File "/tmp/venv/lib/python3.11/site-packages/cliff/app.py", line 402, in run_subcommand
parsed_args = cmd_parser.parse_args(sub_argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1862, in parse_args
args, argv = self.parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1895, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 2107, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 2047, in consume_optional
take_action(action, args, option_string)
File "/usr/lib64/python3.11/argparse.py", line 1971, in take_action
action(self, namespace, argument_values, option_string)
File "/tmp/venv/lib/python3.11/site-packages/osc_lib/cli/parseractions.py", line 45, in __call__
raise argparse.ArgumentTypeError(msg % str(values))
argparse.ArgumentTypeError: Expected 'key=value' type, but got:
clean_up CreateFlavor: Expected 'key=value' type, but got:
With this change:
$ openstack flavor create ... --property '' foo
...
usage: openstack flavor create [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]
[--noindent] [--prefix PREFIX] [--max-width <integer>]
[--fit-width] [--print-empty] [--id <id>]
[--ram <size-mb>] [--disk <size-gb>]
[--ephemeral <size-gb>] [--swap <size-mb>]
[--vcpus <vcpus>] [--rxtx-factor <factor>]
[--public | --private] [--property <key=value>]
[--project <project>] [--description <description>]
[--project-domain <project-domain>]
<flavor-name>
openstack flavor create: error: argument --property: Expected 'key=value' type, but got:
clean_up CreateFlavor:
Change-Id: I9e78b35ad9d016d7a33655141ec579397c5344c0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is testing things now found in osc-lib. Remove it.
Change-Id: Iccbd540fa340c77a957486d16d352d3fe4c3ddb2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We were reusing a variable from a previous loop, which meant this would
never work with multiple servers. Correct the mistake.
Change-Id: I52246e183fb2cf0d855d92058dd305b48783589d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Nothing is setting 'merge_stderr'. It looks like a carry-over from the
legacy clients.
Change-Id: I32b65830e11b27ba83dfba002bf996af561b0768
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Quieten the output of our test runs significantly.
Change-Id: Ie32c919bb987eb0b9bc4c5b2ec54ee20a6841c03
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is mostly a case of skipping tests where the extension is missing,
but some tests are updated to remove a reliance on optional tests.
Change-Id: I25b8811fe09f2a4a9fc20ca5459f5a404b88a337
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The check for extensions was not using a machine readable format for
output. This meant an API check could match on a substring, e.g. a check
for 'qos' would match on 'qos-specs'. Address this issue by switching
our command invocation to use JSON output and migrating the check
function from the general base class to the networking base class.
Change-Id: Idc6dc54503031ddf3e148f50ed53ad8898f7a7e3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
No point duplicating this across functional tests.
Change-Id: I9502be8b4e718885c6f854c7f5b19f6cacf51055
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The default image visibility was changed to 'shared' in API v2.5. Fix
the help information of image visibility, centralizing options in the
process.
Change-Id: Ib3017fc4f618c1e14e3b26b616ff9374d0e24eaa
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
Add some pagination helpers to configure pagination parameters for
various commands. Two pagination schemes are supported, based on what we
currently support across OSC commands: marker-based pagination and
offset-based pagination.
Change-Id: I551bb4c3ff0568c6df5244a1d0f0669497bee58f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add an alias for requesting a server group. This is more syntactic
sugar, though it comes with the added bonus of letting users request a
server group by name instead of just ID.
Change-Id: I3d9a7ce04a02fdf374b7a8082618eccdea8c3217
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
OpenDev is trying to get consumers of these images to update to newer
iterations so that old images can be dropped from the build list. OSC
is successfully running voting python3.11 unittest jobs at this point.
This should make it safe to update the Docker container image for OSC
to python3.11 without risk of regressions.
Making this update should bring some (small) performance updates as
py311 is generally quicker than py310. As mentioned before it will also
allow OpenDev to reduce the set of images that are being built.
Change-Id: I01e3c9e27f92205979ea6562b23f0f7f3b431728
This was missed in [0]. Also update the mailing list link after it moved
to mailman3.
[0] Iaf93c892d211fd7465395d8830f56c2977a88f8b
Change-Id: I91168713a854be0c4348bab3fa34f4b1a924f451
When creating a volume, the scheduler hints can be supplied as strings.
The "same_host" and "different_host" hints can also be supplied as a
list if affinity/anti-affinity to multiple volumes is requested [0]
The previously-used `KeyValueAction` only supplies strings as values - the
last one if multiple --hint contain the same key. An alternative already
used in `CreateServer` would be `KeyValueAppendAction`, but only a subset of
the scheduler hints accept lists, so we cannot use that in general.
Therefore, we create `KeyValueHintAction`. It contains both a
`KeyValueAction` and a `KeyValueAppendAction` object and calls the
appropriate action based on the beginning of the given values as defined
in `APPEND_KEYS`.
[0] d96b705774/cinder/api/schemas/scheduler_hints.py (L31-L65)
Change-Id: Ida7f4662dc9fea24510758541fd4f2622b73bf31
Another quality of life improvements. The key for this one is weird and
the whole thing is a little more involved, hence why it's kept separate.
Change-Id: I75aa85f27905104dc84fffe823c01b4c90a6a822
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Add aliases for the enabling multiattach, caching and replication via
extra spec properties. These are useful since the syntax for setting
each of them is a bit weird and frankly not very discoverable.
Change-Id: I08b51224c66a34a9dcfcffc95847e61d9aac0e7e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Starting in volume API microversion 3.52, it is possible to filter
volume types by extra specs (a.k.a. properties). Even non-admins can do
this for so-called "user visible" extra specs. Make it possible to do
this.
While we're here, the test file is renamed to match the name of the
module under test.
Change-Id: Ia9acc06c0c615bf24e12b63146ea97ac2505f596
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This patch migrates following volume backend commands to SDK:
volume backend capability show
volume backend pool list
Change-Id: Idded38a5f87d51574426c4ac10c806af52984b7c
This ensures we are speccing the compute proxy API.
Change-Id: I7adbf2666d71f222fbd9c1479216f72cb9893348
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'compute_client' rather than 'client' to avoid conflicts with clients
for other services.
Change-Id: I430214cd79eca481bd8d8c53bf97eaede6766eb4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This ensures we are speccing the image proxy API, as we did previously
for the network tests in Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758.
Change-Id: I132ccd1170cc903f6edc505926b071170aeaa08c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'volume_client' rather than 'client' to avoid conflicts with clients for
other services.
Change-Id: I28d78f32142bb3a3fde0ba1780c504adc31cc77c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Using negative lookahead is deprecated, let the jobs be run simply only
on the master branch for now.
Change-Id: Ia53fffb0a3f61cbf85edd96fbeeb5138a88d4d0a
It's of interest which backups are incremental or full. Returning this
information as a column to the list of backups.
Change-Id: I766330228634d5db678df11c23877077a3635372
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: I608edcb863038522677beb8bd2e1eb98c1eec363
Rather than excluding the few fields we don't want, explicitly indicate
the ones we do want. We were already in-effect doing this in our tests,
so this is simply moving the definition from tests to the main code.
Note that this is a problem in the tests for virtually all commands
that will be seen as the SDK continues to evolve and new fields are
added to existing resources. This is a problem that be solved over
time though, rather than in a big bang commit.
Change-Id: Iaa64e97450f5c73cab2e2c3b0c741aec1495b4f1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
While a relatively small library, this is one import that we really
don't need. Remove it.
Change-Id: I726f3c3548cbd896588ef0613222e36c529f5bcc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We use flags, not options with boolean-like values, for boolean
parameters. The affected commands were only introduced recently so this
should have minimal fallout.
Change-Id: I700733e750bff539806af167c9d47cec769c3343
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
On the index page we stopped updating versions table since train. Add
missing entries.
Also small rephrasement in the into on backwards compatibility not to
stick with an ancient release name.
Set oldest release on unreleased page correspondingly.
Change-Id: I4a442708a5b47f573cd2333545531499b9eae0f1
for some reason (clearly another change somewhere in the Sphinx)
extlinks extension used in the releasenotes is failing when extlink
caption is not having substitues same as in the link itself.
> title = caption % part
> ~~~~~~~~^~~~~~
> TypeError: not all arguments converted during string formatting
Now the extension supports setting link capturion to None which works as
we need.
Change-Id: Ie1a61e9b3ee5d727d59525efe34aea696538e2b3
This ensures we are speccing the image proxy API, as we did previously
for the network tests in Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758.
Change-Id: I09539cbf35444272fb3aaabfecd5d731d1ecc4a8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'image_client' rather than 'client' to avoid conflicts with clients for
other services.
Note that this highlights a minor bug with the 'volume create' command
when using the v1 block storage API and creating a volume from an image.
This is corrected, though it can be assumed that no one is actually
using this code path to say it hasn't been reported in the few years
since the bug was introduced in Ussuri.
Change-Id: I571be27f68bb7669dcb883f3b4799731b4a35479
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These no longer makes any sense since all image calls use the SDK proxy
API now.
Change-Id: I48e1d90f9c0dfa904fe37caa0de60d20945f1118
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This ensures we are speccing the network proxy API. Future changes will
do the same for the image proxy API and eventually the compute proxy API
(once everything has been converted).
Change-Id: Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'network_client' rather than 'network' for consistency with other
services.
Change-Id: I61f7c43341acf19ae16d06db34e18970297fbb93
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This no longer makes any sense since all network calls uses the SDK
proxy API now.
Change-Id: I0d57d7561b697270b24acd7b8ff62db73a83f49a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This was still using glanceclient-style calls despite us having switched
all image command to SDK way back in 5.2.0 (Ussuri). It therefore hasn't
worked since then, so we remove without deprecation.
Change-Id: Ibea79ea10bb272cba194debfe4bcbaeebf3875b7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Migrate the block storage aspects of this command to SDK. This means the
'extension list' command, like the 'availability zone list' command
previously, is now using SDK entirely.
While we're here, we also make some fixes to the unit tests for the
network and compute aspects of the command. While we migrated the
network and compute extension commands from neutronclient and novaclient
respectively some time back, we never fully updated the tests. Do this
now.
Change-Id: I631a6a09dfd9d614b1dd7b322dcee8490a52cc43
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/885132
This is a bit of an odd one. Because this is a "common" command, there
are three clients in play here: a compute client, a block storage
client, and a networking client. The networking aspects of this command
are already using SDK though the tests were mistakenly using a fake
version of the legacy neutron client (albeit one with the correct SDK
properties). We were still using legacy clients for the other two.
Correct the networking tests and migrate the compute and block storage
aspects of the command.
Change-Id: I292e1a712bca97e1270e8a97606e02a8a44c2954
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This patch modifes the "server create --boot-from-volume" command
without image option print "'NoneType' object has no attribute 'id'"
story: 2010892
task: 48669
Change-Id: I566f81c285d4ebc1e23ea0762d67492fb6b3bcbe
tox 4 is significantly faster when it comes to creating virtualenvs and
is far better and detecting e.g. changes to requirements. tox 4.3.0
includes many of the fixes for bugs introduced by tox 4.0 and is a good
default candidate.
Change-Id: I0bb7f75ed3e03965ecd4d260c1299b46dcbf4b1b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The --flavor-id option is added to the router create command. The
flavor_id attribute has been supported by the Neutron API for router
POST operations since a long time ago [0].
Partial-Bug: #2020823
[0] https://review.opendev.org/c/openstack/neutron-lib/+/494289
Change-Id: If88499533a92c09e67b0827d1d64156682a3bb8e
This patch migrates the following backup commands to SDK:
* Create Backup
* Show Backup
* List Backup
* Restore Backup
* Delete Backup
Change-Id: Icfadd65b92f4cd343bc327d33e29767bc9b969f9
The existing 3.9 is based on debian buster and isn't getting security
updates ... or any updates really. This change updates to a base
container that will get updates for a while.
I picked 3.10 rather than 3.11 as 3.10 is part of the bobcat[1]
[1] https://governance.openstack.org/tc/reference/runtimes/2023.2.html
Change-Id: I606389a81ab189b1abf2c700acf5c5543a09165a
Took me a bit to figure out how to do token auth today. Document it.
Change-Id: I3edce59efd5ca5a6e31eef8c7cf3cf255234c82e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This document is growing a bit too big now.
Change-Id: Iadf7f28d2307d1598e378bd49a09e75e1235d779
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This patch will add ``image metadef resource type list`` using
SDK, output matches glance client output.
Change-Id: I29850abdbb06d5a4eaf8a9a60f565b46f4009f85
These mess with quotas on the main project, which can have knock-on
effects for other tests. Use a new project.
Change-Id: I687ec3a0985eab4d01c918dae73d2fbdc7ac25fa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The help text for this arg says 'repeat option to delete multiple tags'.
Fix to reflect what docs says.
Also add missing test for this argument.
Change-Id: Ib1069ce7a441c1ff10d2dca05095eb6bf53e7fb6
This patch modifies the access rule commands to use only the resource
ID. The previous logic incorrectly assumed that access rules have a
"name" property, which resulted in unexpected behaviors.
For example, "access rule delete {non-existent-id}" now results in a
"not found" error instead of sometimes deleting an unrelated rule.
Story: 2010775
Task: 48163
Change-Id: Ib5c3b7f86acf1dfe7cc76dfa99fa4c118388bd71
This is more trouble than it's worth now. Black takes care of this for
us. I wish I'd decided this before the blackify series :(
Change-Id: Ifee786c96b6f0bcd96008fed2b3ed3257d02c07c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Introduce the hints port attribute that allows passing in backend
specific hints mainly to allow backend specific performance tuning.
Enable:
openstack port create --hint ALIAS=VALUE
openstack port set --hint ALIAS=VALUE
openstack port unset --hints
Required neutron extension:
port-hints
port-hint-ovs-tx-steering
Valid hint aliases and values:
ovs-tx-steering=hash
ovs-tx-steering=thread
The same hints in JSON format, as expected by the Neutron API:
{"openvswitch": {"other_config": {"tx-steering": "hash"}}}
{"openvswitch": {"other_config": {"tx-steering": "thread"}}}
Change-Id: I4c7142909b1e4fb26fc77ad9ba08ec994cc450b2
Depends-On: https://review.opendev.org/c/openstack/neutron/+/873113
Partial-Bug: #1990842
Related-Change (server side): https://review.opendev.org/c/openstack/neutron/+/873113
Related-Change (spec): https://review.opendev.org/c/openstack/neutron-specs/+/862133
These are already set in the 'TestServer' super class.
Change-Id: I90cfd9ff004c59cadc3e760eb120a460687701fe
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Dropping the use of 'AddFixedIp' server action entirely in favour of
creating an interface with a fixed IP using the 'os-interface' API. The
reason for doing this is because this mechanism allows us to request an
explicit fixed IP.
Adds back support for using the --fixed-ip-address argument for users
who use older nova-api versions.
Change-Id: Ieac4b0fbcb38fe7207eaaa6a79e0c6770ee11d80
In change Ic253184ee5f911ec2052419d328260dc4664b273, we switched to
using the SDK for the 'server show' command. There were a couple of
issues with this change, which we address here:
- openstacksdk uses different names for fields than the nova API. We
opted to output both the original names and the openstacksdk aliases
in the output. With testing, however, it's become obvious that the
resulting output is very long and rather unfriendly from a UX
perspective. We opt to only show fields with their original names.
- A number of fields included in the output are only valid in requests
and will never be present in responses. These are removed.
- A number of fields are not present in later API microversions or are
only present under certain conditions. These are removed from output
when not included in responses.
- The image and flavor fields both had errant logic that resulted in
unnecessary or incorrect information being show. This logic is
corrected.
With these changes, the output now resembles the output seen before the
migration to openstacksdk. In the future we may wish to build on this
further and switch from a blacklist model (removing the fields we do not
wish to show from output) to a whitelist model (specifically stating
which fields to show) but that's a change for another day.
Change-Id: I7e3eaa0149bff202c8fd4538356cbc75b4f7e708
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There are a few outstanding commands. Migrate them in one fell swoop. We
do lose a small bit of information about commands that are only
supported in block storage API version 2.0 or later, but who cares about
block storage API version 1.0 these days?
On a related note, we also use the 'openstack.volume.v3' entrypoint
rather than the v2 one since that's more relevant nowadays and the code
is pretty much identical.
Change-Id: Ide9d65596847d3f855981ff4ec57eeaeea6667a7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Supporting "--no-property" option will apply user a convenient way to
clean all properties of volume qos in a short command. The patch adds
"--no-property" option in "volume qos set" command and update related
test cases and docs.
Change-Id: I1fb5b4f0a923bbf557a3af3f63809bde9e84ffd4
We also rename the test file and fixup some of the tests.
Change-Id: I3731255648dc91c023a1390c3b37e68b6608f850
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
Story: 2008478
Task: 41518
A mistake was introduced during the conversion from novaclient to SDK in
change I5ebfa6b2468d5f20b99ea0eab1aea9377be09b8c. Fix the issue and add
functional tests to prevent it being reintroduced.
Change-Id: I6b314eab31bcf452e88b8b6a239ac2e296497cb9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Story: 2010750
Task: 48004
currently the command is waiting only for ACTIVE server status,
but if the server was SHUTOFF before, it will be SHUTOFF after
rebuild as well, so the command is stuck in waiting forever.
Additionally, we now also pre-validate the server status on client side,
and raise an error if the server to be rebuilt is not in ACTIVE, ERROR
or SHUTOFF state.
Change-Id: If90a4bbba9a7ecd972f8b594c52fee4f75a0ae5e
Co-Authored-By: Oleksiy Molchanov <omolchanov@mirantis.com>
Story: 2010751
Task: 48005
We had not migrated a number of tests to use SDK objects instead of fake
novaclient-like objects when migrating the commands themselves. Address
this now.
Change-Id: Ib0da07fd9d793968b111986bd36a6d4311469d4e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This will make future changes slightly less complex.
Change-Id: Ia69fd9d05796cce5ed48a8d12902cb54caec9779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Since our pep8 tox env now runs pre-commit, we can ensure that black
styling will be maintained.
Change-Id: Ifad1d67a83c4979b4f4de71de0124613d1133560
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add a .git-blame-ignore-revs file to ignore the black changes. File was
generated with the following command:
git log --pretty=format:"%H # %s" --no-merges --grep='Blacken'
Change-Id: I4c5c06a8d194cce4d490dc2b01040c68853451c2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I356643d06b2cd408ccaedfe02b858aea55388949
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I1df5bc4c35f02147fe5ac5b4073f0e01e7d51c2f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ifcb3c798666d74d596b8ecb3d6d507f782de7ba5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I6420ec6fd550903b03083b9b1f8391511913c86f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I6658e76d7d1f93149f24fcab28d593195b37779f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I2eeade1ce6653be8e9179ecc40105182c5ff5f16
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I8048746dbc2ef0cb582f68934734db4c1153d779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ic318617c67ab7ce6527f9016b759a1d4b0b80802
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I9af45c062d179ab3dc2a5e969e1c467932753a2b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We want to bump the versions of hacking, but doing so requires changes
in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly:
we can simply use tox to handle pre-commit and leave all other
dependencies to pre-commit. Do this, migrating bandit to pre-commit and
bumping the other dependencies in the process.
We remove the 'fast8' target and tool, since pre-commit is plenty fast
here.
Change-Id: Ifdc582ecc3b4479ea9ed9abcb16577c6e8b2f5c1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We'd like to use pre-commit as our 'pep8' target. Before we do that, we
need to address some issues that have crept in over the time since
pre-commit was first added.
Change-Id: I3bb383a00a44007eaa241e037e38aea16bd517b2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Starting with the 2.92 microversion, nova will no longer generate SSH
keys. Avoid breaking users by generating keypairs ourselves using the
cryptography library, which was already an indirect dependency through
openstacksdk.
Change-Id: I3ad2732f70854ab72da0947f00847351dda23944
Implements: blueprint keypair-generation-removal
This one is tricky since the ServerAction resources includes a nested
ServerActionEvent resource which requires a custom formatter in order
for things to render as expected.
Change-Id: I3d24851303222af9efcee8d7e1565278b1018efd
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
pep gods started complaining (correctfully) about spacing in the old
command. Apply `black -l 79` on the file to make it looking nice and
passing checks.
Change-Id: I716f6a1496fc552b32809c7eb744283f3a3cd5a4
OSC has historically relied on project-specific clients like novaclient
for library bindings. These did not support auto-negotiation of
versions. Instead, users were advised to set the requested microversion
to e.g. '2.latest' to opt into the latest API version supported by the
client.
We're slowly migrating everything to SDK which *does* support
auto-negotiation (well, of sorts). This makes versions like '2.latest'
unecessary and SDK correctly warns the user about this.
You have a configured API_VERSION with 'latest' in it. In the context
of openstacksdk this doesn't make any sense.
Unfortunately, we have not yet migrated all commands to SDK, meaning we
have a mix of SDK and legacy client-based commands. So long as there are
any command using the legacy client, we can't insist on users removing
this configuration. This makes the warning both annoying and something
the user can't do anything about. We also don't want to remove the
warning from SDK so instead we opt to filter it out, along with all
other warnings from openstacksdk (which similarly a user can't do
anything about).
Change-Id: If8a7cf9bc876f84864d66f5aed5f2f61c5d0696a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Previously, using the "--matching" option shows empty results.
Previously, the "--matching" option called the "find_hypervisor method",
so we used to call the "hypervisor method"
like any other "--limit, --marker" options.
Depending on the nova api version, the api that is basically
called is as follows
2.53 >= : /os-hypervisors/detail?hypervisor_hostname_pattern=$HOSTNAME
2.53 < : /os-hypervisors/{pattern}/search
Hypervisor Type and Host IP are not returned
when using microversion 2.52 or lower
Co-authored-by: Jipyo Hong <hongsbien@naver.com>
Co-authored-by: Jieon Lee <dlwldjs7544@naver.com>
Co-authored-by: YoonSoo LIM <msdbtjd123@naver.com>
story: 2010670
task: 47726
Change-Id: I7b47acf48def7d4c5f4b74e4dba1c23d8ac7abf2
"openstack port list --security-group <id>" was using a filter that
didn't exist in `openstacksdk`: "security_groups". Up until version
1.0.1, `openstacksdk` did not support filtering `Port` objects by
security groups. Later versions will support the filtering (via [1]),
but the filter is called the same way the attribute on the `Port` object
is called: `security_group_ids`.
We're not bumping the `openstacksdk` version here, because the feature
we're using [1] is merged too recently and a bump of min requirements
thus unlikely. `openstackclient` continue to work with older versions of
`openstacksdk` - the "--security-group" filter will just do nothing like
before.
[1] https://review.opendev.org/c/openstack/openstacksdk/+/866008
Change-Id: I07088484592e99ce0a12b67d68a3e47ae7c7af81
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I248bcb0342afb8276ba9605963287f620b62b6c5
The current "image set" with the state option behaves as follows: if you
use --project, it updates the membership status of the given project.
When this command was first added, it had the following description:
If --project is passed, update the membership status for the given project
However, the description was missed when moving the documentation for
which command to the parser for each command method in commit f055fe67c.
Correct this oversight.
Co-authored-by: JAE YONG LEE <jaeljy135@gmail.com>
Change-Id: I18a29a19ce973971f68a52cbf4020cfa324c7a35
Since we removed the osc-functional-devstack-n-net job in change
I76efeccec04937c3a68108e2654872e00fadcec4, there's no need to maintain
separate osc-functional-devstack-base and osc-functional-devstack jobs.
Merge them.
Change-Id: Id3dcd3c4f9f47a4020faf0787f44bd5509a2b5a2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This patch add a check to be sure that the volume created is in a
available state before trying to set bootable or readonly flag.
Story: 2002158
Change-Id: I8db71fd8cf5bd14eb67880f76d2e9135edeb3ed2
There are a number of commands we're never going to implement:
host-evacuate
host-evacuate-live
host-servers-migrate
As noted in Dan Smith's blog [1], these are wrapper commands or meta
operations that call a particular action - namely 'evacuate',
'live-migration', and 'migrate' in old novaclient parlance - for
each server on a particular host.
These commands have historically been confusing. The underlying
server commands have been implemented as 'server evacuate', 'server
migrate --live', and 'server migrate', respectively. If a user wants
to call these for each server on the host, they can do so with a
little bit of shell scripting (hint: you want 'server list --host')
or use something more suitable for this kind of task such as Puppet
or Ansible.
host-meta
As above, this is equivalent to calling 'meta' for all servers on
the host. Combine 'server set --property' with 'server list --host'
instead (or use Ansible).
instance-usage-audit-log
This corresponds to the '/os-instance_usage_audit_log' API which is
intended for use by OpenStack Telemetry. There's no user-facing
application of this.
The remaining entries are updated to include their implementations. We
simply missed updating the mapping doc when implementing them.
With this, the OSC implementation of the nova API is *documented* as
being complete, as opposed to merely actually being complete 😉
[1] https://www.danplanet.com/blog/2016/03/03/evacuate-in-nova-one-command-to-confuse-us-all/
Change-Id: If08d501dd66c561956266d3b3f21dfd3559d8394
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
There are now many ways to create a new volume group, thus the
positional arguments don't make sense. Deprecate them.
Change-Id: Id0b212426861719db1812b7d07b82613cf591de4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This patch adds ``--source-group`` and ``--group-snapshot`` options
to the ``volume group create`` command to allow creating group from
a source group or a group snapshot.
Change-Id: I87482a5dd43c519dfdcf981635aa879914a70a5c
This patch adds the ``block storage volume manageable list`` and
``block storage snapshot manageable list`` commands that
allow operators to list the volumes and snapshots on a
particular host or cluster for management under OpenStack.
Change-Id: I328dada5a0dc4e9e44c0d51db5cf3f224e27f88f
This patch adds the ``block storage cleanup`` command that
allow operators to cleanup resources (volumes and snapshots) with
failed operations by requesting services in other hosts in the
same cluster to cleanup resources of a failed service.
Change-Id: I1375223f525021db5201fa0a9f9a647d17dd01f7
This patch adds the ``block storage log level list`` and
``block storage log level set`` commands that allow
operators to list the current log levels of cinder services
and also enables them to set a particular log level.
Change-Id: I16cd8084fb505a9e68a35a936ef3b8b1f3cdc712
Sometimes it is useful to be able to use the project cleanup function in
scripts and having to add "echo y | openstack" isn't really nice.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I3ded9982769b4568b6dcfc49bc31ba67a6227839
The '--consistency-group-source' and '--consistency-group-snapshot' opts
are unnecessarily verbose. Shorten them to '--source' and '--snapshot',
respectively, maintaining aliases to avoid breaking users.
Change-Id: I2b6656a8a09d953eb4406f1d4fd1e804743a8963
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Network trunk commands originally were added to python-neutronclient,
although we can long consider these operations core Networking operations.
This patch is not a blind copy but also changes the original code to use
openstacksdk python bindings instead of the binding code in
python-neutronclient as that is already deprecated.
Change-Id: Ic4bc35c296a95d5dae92e9fc1cab3a3fa8f103cd
Related-Bug: #1999774
This patch adds the ``volume summary`` command which shows the total
size, total count and metadata of all volumes.
This command is available from microversion 3.12 and the metadata
info is available from microversion 3.36.
Change-Id: I6472337e8b1dc91aad5fbe416673a5d5a5d5fa88
We missed this when migrating the 'server migration list' command
across.
Change-Id: Ide05a0289020764829f1dbc416be5336fdf37d84
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Coverage report should not include statiststics on test modules
which is not only unnecessary, but also pollutes the coverage
statistics and pollutes the final report.
Requesting the path to tests to be omitted in .coveragerc resolves the issue.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ifedaa1c8bfab23d92958e58c69c03e778454a408
There is no default for ask_user_yesno() since an empty answer instead
just repeats the question. Drop the unnecessary parameter.
Change-Id: I207bccbcbd31f831765e74a20c503b695790c0f5
This one is a little more complicated because we support waiting.
Change-Id: I5bd65b44c23bfee1e0144dbd060563ecc3cfb942
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This was used by 'run_method_with_servers', not the SDK-equivalent.
Change-Id: Ia3333a95e406f430beb4f2cfb887e81ab7b72cfe
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We use 'set', not 'update', in command names. An alias is provided.
Change-Id: I7864599e06df055999b975aabf101611cd482753
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Switch the server volume list command from novaclient to SDK.
Modified functional test for server add/remove volume.
Change-Id: I5b4ab7d0275aec2e02451c5371319ac350af6a5f
Using options --long and -c and specifying same columns added
by --long option, it passes duplicated column names to prettytable and
report the following error:
Field names must be unique!
This patch removes duplicated columns.
Change-Id: I9c0bd09c50dac568ca1980a6b53a6c544b85c2aa
This functional test case for hypervisor list and show makes sure it
works with the openstackclient sdk.
Change-Id: Ibaeaf68d6056fcf904b546f30287c65173b5a368
A recent change to cliff [1] means we're now stripping periods when
generating the summary line of command help strings. Account for this.
[1] https://review.opendev.org/c/openstack/cliff/+/867274
Change-Id: I45b39b9fe38914497505f157e91d84cd2f84f547
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Each command should have a summary line followed by a longer
description, if needed. Some commands were not following this. Fix them.
Change-Id: If1ce7654037d192626460f34c069ea0979919b9b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The fixed_ip_address parameter needs to be passed in a hash with key
"ip_address" in order to be processed by the server, the previous arg
was simply being ignored.
Added a functional test for better coverage.
Closes-Bug: 1998927
Change-Id: I6956d2642d8e80fc10c3739f0a571aa7ba276b1a
Use the SDK for the server show command. This change modifies a helper
function that is used by server show as well as other commands that
print information about an individual server. The helper still uses
novaclient APIs when additional OpenStack requests are needed since some
of its callers are still using the nova client.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/864340
Change-Id: Ic253184ee5f911ec2052419d328260dc4664b273
Added two new filter flags to ``openstack network qos rule type list``:
- "--all-supported", to return any QoS rule type supported by at least
one loaded driver.
- "--all-rules", to return all QoS rule types supported by the current
version of Neutron server, regardless of the loaded drivers.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/827671
Depends-On: https://review.opendev.org/c/openstack/neutron/+/827683
Related-Bug: #1959749
Change-Id: Ie0622e79ecf7dadd6560fea142352f5a2ed66b74
Added the missing commands from glanceclient, updated the OSC
equivalent and removed the deprecated commands.
Change-Id: I3cee7882f6712e80c6f6e568337c1f96439aa1a5
When creating a server with an attached volume, you can specify a block
device with a 'boot_index' of '0' and this will become the bootable
device. OSC allows users to do this by using either the '--volume'
option or a combination of the '--image' and '--boot-from-volume'
options, but we should also allow them to do it the "hard way" via the
'--block-device' option. For example:
openstack server create \
--block-device uuid=0a89ecd8-1fe2-45f0-94da-7789067911c9,boot_index=0 \
--block-device uuid=589266ef-fd88-46e9-b7b2-94503ce8f88f,boot_index=1 \
... \
my-server
Make this possible.
Change-Id: Ia48449fecbc590346630807b1c7da40102d53b33
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2010376
Task: 46617
The 'server create' command should support multiple '--block-device'
parameters. Prove it.
Change-Id: I1bd83287efdbbe11774053b694bae99b6a4ebdf5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Whenever we attempt to find a provided image, we generally want to fail
fast if they can't be found. This wasn't happening. Fix it.
Change-Id: Ibea38354a78381cb87d287f03726ecd03ecd246d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This reverts commit 042be7c7fe. This
solution worked but it was confusing. The issue that the author was
seeing was presumably due to users not being able to list projects but in
theory the 'openstackclient.image.common.find_project' function that was
being called here should have already handle this. It transpires however
that there was a bug in this and we weren't correctly handling HTTP 403
errors correctly. This bug has since been fixed in change
I2ea2def607ec5be112e42d53a1e660fef0cdd69c meaning this change is no
longer necessary. Remove it and simplify the code somewhat.
Change-Id: I108efec2c8deda50fcb9cc84f313602bed2ac15c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Update server migration list to use the OpenStack SDK instead of
directly using the nova interface.
Change-Id: I40dc95ee47e7c33ebf596f8ad437228b4bb0ab33
Off the back of a recent post to openstack-discuss [1], list the common
actions used in OSC along with some conditions around their expected
use and implementation.
[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-November/031284.html
Change-Id: Id6610d678e7b3b12afdd89a674fbbe7090f64444
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Update server list to use the compute component of the OpenStack SDK
instead of directly using the nova interface. This change depends on SDK
version 0.102.0 for automatic client-side query filters.
Change-Id: Ib9985812bfd98320b75f3a82bb594a0daa6e4d93
This patch adds a test to create a new volume from source.
We also include code changes to pass the right size i.e. either
size passed by the user via --size argument or the source volume
size. This case is already handled at the API layer[1] but it
helps being consistent with passing the right size value as in case
of creating a volume from snapshot or backup.
[1] 7c1a5ce7b1/cinder/api/v3/volumes.py (L381-L382)
Change-Id: Idc71636dad6bb678fe24f19b0836d2e9bd92d7d2
Support for creating a volume from backup was added in
microversio 3.47. This patch adds a --backup option
to the volume create command to add that support.
Change-Id: Ib26d2d335475d9aacbf77c0fd7b7cda2ba743943
The command "volume attachment create" has a typo in the docstring.
The docstring says to use "server add volume", but the command is
actually "server volume add". This
change fixes the typo in the docstring.
Task: 46781
Story: 2010401
Change-Id: Ie19a24ead100dd9177669653a7a9997772ef4538
Note that we require some additional functionality in SDK for this to
work properly, but it's a start.
Change-Id: I87f94db6cced67f36f71685e791416f9eed16bd0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is the equivalent of the 'image-stage' glanceclient command.
Change-Id: I10b01ef145740a2f7ffe5a8c7ce0296df0ece0bd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
You can provide data via stdin when creating an image. Using this with
'--progress' makes no sense and causes an error currently. Fix this.
Change-Id: I3c2d658b72a7c62931b779b0d19bb97f60a0c655
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This change adds and ability to filter out the baremetal nodes in
'network agent list' command.
Related-Story: 2008590
Related-Task: 41746
Related-Bug: #1658964
Change-Id: I01ffbd82662abbc1c2f56eb8f1e700f392bc063c
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
We do this everywhere. Add a simple knob to simplify the pattern. Only
one use is migrated initially. The rest will be done separately.
Change-Id: Ic3b8958bd4fb1459a8ac3adaff216c2a26628491
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The 'auto' and 'none' network allocation policies are only supported on
compute API microversion 2.37 or later. Enforce this in the code.
Change-Id: I90f8fb1e61ead4bd406ea76bbeb731b913805b13
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2010385
Task: 46657
This should lookup a network called 'none' or 'auto', not do the
equivalent on '--nic none' or '--nic auto'. Correct this.
Change-Id: I3c5acc49bfe8162d8fb6110603da56d56090b78f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2010385
Task: 46658
nova-network has been removed from nova for a very long time now and
we've no way to test it in CI save for installing old versions of
OpenStack. We don't care about this enough to do that, so just remove
the thing.
In the vein of things that have been removed, we also remove
configuration that was supposed to enable cinder's v1 API but doesn't
since the related knob was removed over 5 years ago [1].
[1] 3e91de956e
Change-Id: I76efeccec04937c3a68108e2654872e00fadcec4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The ability to rescue a volume-backed server was added in compute
microversion 2.87 [1].
This adds a note to the command help to improve user experience.
[1] https://docs.openstack.org/nova/latest/user/rescue.html
Change-Id: I5f40c3ca28e13bd1f979bc5f8c337302a3b9a5be
These are aliases for '--nic none' and '--nic auto', respectively.
Change-Id: I7b4f7e5c3769a813bd8b2b9cd6090c6fe501e13d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The `server dump create` command instructs Nova to trigger a crash
dump in the guest OS. Assuming the guest supports this, the resulting
dump file will be located in the guest, in a location dependent on the
guest OS. Explain all that in the helptext.
Story: 2010384
Change-Id: If940ed5cce6c5ab4193ab1494738149370da9aad
Update usage list and usage show to use the compute component of the
OpenStack SDK instead of directly using the nova interface.
Change-Id: I1c4d2247c9c1a577ed9efad7e8332e7c9b974ad5
In change Idc1b99492d609eb699d0a6bef6cd760458a774f6, we added a
'--check-limit' option to enable "no force" behavior for network quotas.
This was already the default for compute quotas. Provide a path for
harmonizing the behavior of the two options by instead using a
'--no-force' option which will become the eventual default for the
network quotas also.
Change-Id: I25828a3d68e2e900f498e17a0d01fb70be77548e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We were passing a project object rather than just the ID. Also correct a
typo in the call to delete network quotas.
Change-Id: I2292db7932ec01026f0e54014e3d02218792617a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
I guess this was defined to avoid a circular import. There are easier
ways to do this.
Change-Id: Iab215a53691298413ea9d10def792008ab9edbce
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These are important and they're easier to identify at the top of the
file than nested deep inside.
Change-Id: I1569c855fadfe4cdacf83ee07d08922bf3edefbc
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This doesn't do anything special in nova and cinder and is not supported
in neutron. For the 'quota show' command, people should use the
'--default' argument instead.
Change-Id: I0dd38e5cb252a01d5817ed168be040b21b35e348
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add '--compute', '--network' and '--volume' options to the 'quota show'
command, along with a default '--all' option, allowing us to restrict
quotas shown to an individual service.
Change-Id: I122b765df01887b8d916ee6567ffb7768fcb4392
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Provide an more sane way to get usage information for a particular
project's quotas. This requires using the 'Lister' command type since
the 'ShowOne' command type only allows for simple key-value pair output.
We also add a note indicating that the '<project>' argument is optional.
Change-Id: Ic7342cf08f024cc690049414c5eef5b9a7594677
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is prep work for some changes we're introducing in a later change.
Change-Id: I27a59bc1d57e6815fb166fb99ea2af88f08b68a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
I don't think it has ever worked in fact..
The server.evacuate() in novaclient returns not a Server() instance,
but a TupleWithMeta() object, that has no .to_dict() method [0]
used in _prep_server_detail() function.
[0] https://review.opendev.org/c/openstack/python-novaclient/+/276639
Change-Id: I22f9ac072eb1b0bfd1263a256e9bea4500c03290
Story: 2010204
Task: 45928
currently this command tries to fetch extra_specs for any flavor
that does not have them (which is quite usual), regardless if the
command was even asked to display them (--long) at all.
This significantly slows down this command as it makes a lot of
unnecessary REST calls, one per each flavor to fetch extra_specs for.
With this patch, client only attempts to fetch flavor extra_specs if
the user actually called the client with --long.
Change-Id: Ia36414d891a41b641d7a9a04f0a1e7d43cfee351
Story: 2010343
Task: 46484
We were stating that this was not supported. That is not true. Correct
the oversight.
Change-Id: Ib9d9db641a18e142be0a1eccff783e7cccdf2db5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We had previously indicated that people use 'quota set' for unsetting a
project's quotas, however, there was nothing that actually allowed us to
do this. Correct that oversight.
Change-Id: I04057e766b8ccf94bf219972249b68dc2bb796d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
I had incorrectly marked the 'api-version' command as WONTFIX. Turns out
we already support this, albeit via keystone as opposed to a
cinder-specific API.
Change-Id: I804ef1ca5a0f4df844d8c2229688c4edbac45aa9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.
See also the PTI in governance [1].
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: Ie3677749177a32507007833717b9bc484ce2c493
Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: Ie570af5ce752d91190ebf6aa3c5ff2329afa36d3
This replaces the 'glance task-list' command.
$ openstack image task list
We also indicate that the 'image task create' command will never be
implemented. This is an admin-only API that isn't really intended to be
used by humans thus it does not need an OSC command implementation.
Change-Id: Id8a943a5443782fc70c0fbf3639f5aa17b9d30af
The assertItemsEqual were replaced with assertCountEqual in
I0bbffbec8889b8b3067cfe17d258f5cb16624f38.
However the following changes add assertItemsEqual after that.
* I1095100efb27b8559412469f0a9d07fc0a3db9d5
* Ic230c2c5cda8255d8f2c422880aeac81670b2df3
* Ica3320242a38901c1180b2b29109c9474366fde0
So Replace assertItemsEqual with assertCountEqual again.
Change-Id: I11ff1748225e434f64dbaf7b88dc80ba28a5e2a0
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Add '--reimage-boot-volume' and '--no-reimage-boot-volume parameters'
to the rebuild command to allow rebuilding of volume backed instances.
Change-Id: I4a6e30b2cf12f32202a2d9ef1ced347e1dd139f3
A volume-backed server will have no image attribute (or rather the image
property will be set to the empty string). As such, if you want to try
rebuild you will need to specify an image [*]. Enforce this.
[*] Before microversion 2.93, this must be the same image. However, we
don't touch on that here. This will be addressed later.
Change-Id: I6842dabd7acb4e3a78f894e55e616625757eb6a4
Story: 2010297
Task: 46290
Implements a new parser argument "--target-project" to
list RBAC policies for a specific tenant project only.
This uses the already existing server-side query
parameter "target_tenant".
Story: 2009937
Task: 44824
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/834442
Change-Id: I83ff07041a022e8795e3c5550c6a7aabb0c0d8c8
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
This isn't true with the new dependency resolver introduced in pip 20.3.
Change-Id: Ie28fe625663c960fbffa12efb1503b8c9f8c0581
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The recently added support for nova API microversions 2.91 and 2.92
necessitate a newer version of python-novaclient. Make it so.
Change-Id: I40a77334e4aee2e196062c38a0bb70f8f3079b44
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This patch adds a new parameter ``--host`` to
``openstack server unshelve`` command. This can help administrators to specify
an ``host`` to unshelve a shelve offloaded server.
And add new parameter ``--no-availability-zone`` to unpin a server availability
These parameters are available in the 2.91 microversion.
Depends-On: https://review.opendev.org/c/openstack/python-novaclient/+/831651
Implements: blueprint unshelve-to-host
Change-Id: I7986adc7563f63bcd4b3caf5eb7bc4329b4e1eca
Since 4.0, '--os-url' global option is no longer supported.
And this option had been replaced to '--os-endpoint'
- Refer Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f
- Refer Docs: doc/source/cli/backwards-incompatible.rs
I fixed in documents as below
- OPTIONS: '--os-url' to '--os-endpoint'
- ENVIRONMENT VARIABLES: 'OS_URL' to 'OS_ENDPOINT'
- and relevant sentence
Change-Id: Ibb0cddf34375df941678ee07a005d81399ec7195
The 'config show' command will show information about your current
configuration. When using a 'cloud.yaml' file and the 'OS_CLOUD'
environment variable, the output of this will look like so:
$ openstack config show
+---------------------------------------------+----------------------------------+
| Field | Value |
+---------------------------------------------+----------------------------------+
| additional_user_agent | [('osc-lib', '2.6.0')] |
| api_timeout | None |
| auth.auth_url | https://example.com:13000 |
| auth.password | <redacted> |
| auth.project_domain_id | default |
| auth.project_id | c73b7097d07c46f78eb4b4dcfbac5ca8 |
| auth.project_name | test-project |
| auth.user_domain_name | example.com |
| auth.username | john-doe |
...
All of the 'auth.'-prefixed values are extracted from the corresponding
entry in the 'clouds.yaml' file. You'll note that the 'auth.password'
value is not shown. Instead, it is masked and replaced with
'<redacted>'.
However, a 'clouds.yaml' file is not the only way to configure these
tools. You can also use old school environment variables. By using an
openrc file from Horizon (or the clouds2env tool [1]), we will set
various 'OS_'-prefixed environment variables. When you use the 'config
show' command with these environment variables set, we will see all of
these values appear in the output *without* an 'auth.' prefix. Scanning
down we will see the password value is not redacted.
$ openstack config show
+---------------------------------------------+----------------------------------+
| Field | Value |
+---------------------------------------------+----------------------------------+
| additional_user_agent | [('osc-lib', '2.6.0')] |
| api_timeout | None |
...
| password | secret-password |
...
This will also happen if using tokens. This is obviously incorrect.
These should be masked also. Make it so. This involves enhancing our
fake config generation code to generate config that looks like it came
from environment variables.
Change-Id: I560b928e5e6bcdcd89c409e0678dfc0d0b056c0e
Story: 2008816
Task: 42260
Update missing command in Mapping Guide.
List of updated command
[Nova CLI / OSC]
instance-action-list / server event list
Change-Id: I1436a6c1bdd881890e015cf0f1829c38378b36fa
The 'neutron tag-replace' command is equivalent to the 'openstack
network set --no-tag --tag <tag> [--tag <tag> ...]' command. '--no-tag'
will unset all tags while '--tag <tag>' will set a new tag and can be
specified multiple times.
The 'nova hypervisor-uptime' command is equivalent to the 'openstack
hypervisor show' command. Before compute microversion 2.88, the nova
command was using a different API that returned an almost identical
output to 'nova hypervisor-show' except it included an 'uptime' field.
Since 2.88, this field is returned in the standard call. OSC abstracts
this detail away so the 'uptime' field is always present, removing the
need for a separate command.
The 'nova migration-list' command is implemented as 'openstack server
migration list' (simply omit the '--server' filter).
The 'nova volume-update' command is implemented as 'openstack server
volume update'.
The 'nova volume-attachments' command is actually available as
'openstack server volume list', though you can also use 'server show'.
The 'nova aggregate-cache-images' corresponds to an internal API that
only glance should be using. It doesn't need to be exposed via
openstackclient.
Change-Id: Icdbc42762230954f6f7f2064b6228416af41d45a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Python 3.6 and Python 3.7 support has been dropped since Zed [1]. This
necessitates changes our jobs to build and publish docker images since
those currently use Python 3.6. We now use Python 3.9.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: I228b7ff6691a025f1ba9b7d9449f294868942151
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
We're using tags in '.zuul.yaml', which requires use of the unsafe
parser [1].
[1] https://stackoverflow.com/a/45967047
Change-Id: Ib97480f6fcaba7406ffe284e1935744346684b8b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The 'image create' operation is actually one of two operations: it can
be either an image service (glance) operation if the '--volume' argument
is *not* passed or a block storage (cinder) operation if it is. Make
this clearer and add a log warning users about options that are
supported by the former but not the latter.
Change-Id: Id153c951a7d18403568bf67e13d5e0a4827428d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Simplify some logic by using a common 'dest' for mutually exclusive
options.
Change-Id: Ie5f3600672953f40be52de51e84717c8912ddaf8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Currently the command ``openstack image create --volume`` calls cinderclient
to upload the volume to image service (glance) but OSC passes ``visibility``
and ``protected`` fields which are only available in microversion 3.1 or
greater. This generates an error if the user is using volume microversion
< 3.1 and wants to create an image from volume.
This patch fixes that by only passing ``visibility`` and ``protected`` fields
when the volume microversion is 3.1 or greater and fail otherwise i.e. the
following 3 cases:
1) visibility/protected argument + mv >= 3.1 = pass
2) visibility/protected argument + mv < 3.1 = fail
3) not visibility/protected argument + any mv = pass
Story: 2010060
Task: 45511
Change-Id: I568a0ea0af8f7f82b16d49a6a1bb0391b99c50dc
This test was added in [0] and it causes a lot of failures, since
setting the network quota to 1 will result in quota errors for any other
test that is trying to create a network in parallel. We can only run
this test in a serial tempest task that would need to be created for
such a scenario.
Related-Story: 2010110
Change-Id: I6015c181ecabff26bdb1b0c11b0e33ad39e6f083
Patch [0] dropped mapping the tenant_id attribute to project_id.
However, the Neutron API still returns the tenant_id attribute in
addition to the project_id and so we still need to discard it from
the output.
[0] I5f62f2a76592eaaaed6703624e959df41a6ecc8f
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Iba1e003bf587802f28928cb44d160b3b3fb1f840
Add a "--all" option to "openstack image list", which allows the user to
list all of the images.
Story: 2010071
Change-Id: I56a2e4846d0380d07803305fb830d1a43dfd71b3
python-novaclient 18.0.0 removed support for Python 3.6 and 3.7 and
can't be installed in Python 3.6.
This change migrates the osc-tox-py3N-tips from Python 3.6 to Python
3.8 as Python 3.8 is the minimum version currently supported.
This also adds Python 3.9 to supported runtime list because it has been
tested since stable/yoga.
NOTE:
The osc-tox-py36-tips job is used by cliff, so the subsequent patch
for the cliff repo should be merged timely.
Change-Id: Id7a8f3ca5b704102aa18eb6bf98ae9ada005d013
Currently, the 'Host Status' field is shown only for 'server show' but
not for 'server list'. The host_status can be helpful for users who are
having issues with servers that show a status of ACTIVE, as it can show
a hint about the compute host status when nova policy is configured to
allow it.
Story: 2009689
Task: 44003
Change-Id: I6209cf52044218b7b32ab2fa5712574f12ba2f5f
When adding these, we missed that the underlying cinder library call
actually returns a dictionary and not a Resource-based object. This
requires slightly different handling. Fix this.
Change-Id: Ie065fe4198ae1238830cb619220e856390d4cb6e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Currently in case of passing `--tag` several times, only last one will
be picked up for the filtering. In the meanwhile Glance allow option to
be repeated multiple times to filter based on the multiple tags.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827
Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1
These are based on the 'cinder list-filters' command, which accepts an
optional '--resource {resource}' option to limit the listed filters to a
single resource type.
block storage resource filter list
block storage resource filter show
We used the 'block storage resource filter' terminology rather than
simply 'resource filter' to highlight the fact that this is specific to
the block storage service.
Note that while this feature is a bit weird, good documentation can be
found at [1].
[1] https://docs.openstack.org/cinder/latest/admin/generalized_filters.html
Change-Id: I21e7c0ea427aef1f6665394d4b8e9a1f30d6dbb1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These mirror the 'cinder cluster-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
replacement of "tenant" terminology with "project".
block storage cluster list
block storage cluster set
block storage cluster show
We used the 'block storage' terminology rather than simply 'volume' to
allow us to start distinguishing between the volume service and a volume
resource.
Change-Id: I9105a9e4a139af4929e3b1f3a6de6c9a53e0b598
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
currently this double-private method of a dependency library
is used in several places (openstack.cloud._utils._is_uuid_like)
openstacksdk deliberatly chose not to depend on oslo.utils to keep
dependenies to the minimum, so it just copied several methods from it,
including the is_uuid_like.
python-openstackclient however already depends on oslo.utils, so
using the public method from oslo.utils should be preferred
and more stable.
Change-Id: I578ffa36ffb00c9d47ee12a149313201973edd32
In order to improve the convenient of use,
columns corresponding to the "--long" option has been added
so that it can be used in the filter.
Currently filterable columns include the following:
'ID', 'Name', 'Status', 'Networks', 'Image', 'Flavor'.
Story: 2009150
Task: 43113
Change-Id: I6760ca5da0e3707d1d746ae5eeec7d9162020d15
The Glance API allows us to filter by multiple IDs using the 'in:'
operator. Take advantage of this to speed up listing of server in larger
deployments where image counts in the hundreds (or even thousands) are
not uncommon.
Unfortunately the Nova API does not support something similar for
listing flavors. Boo.
Change-Id: I7d3222d0b0b8bf72b4ff3e429bc49e621b569979
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/837613
The keystone API supports filtering trusts by trustor and/or
trustee.
Also adds a shortcut parameter to get trusts with current
user as trustee or trustor.
Signed-off-by: Nicolas Belouin <nicolas.belouin@gandi.net>
Change-Id: I00ed2b68cf8ada214a59f640f4f0a5c9dbc37063
This flag allows to set a new Neutron quota resource limit without
checking first the current resource usage. The new limit will be
set anyway. This flag was used only by the compute engine.
Related-Bug: #1953170
Change-Id: I7084f8208b804236ac99e6842db7a45854ce54d7
Make the positional argument "volume" optional and add a "--force"
option (volume v2 only) to the "volume backup restore" command.
Closes-Bug: #1597189
Change-Id: If944e10158bd18e8331be63e96187a23e23095d7
The 'openstackclient.compute.v2.server' module is getting rather large.
The server migration commands don't need to be in there. Move them.
Change-Id: I8b2600cfd9f8e37d3093c52c7222d85e84e7fc89
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The nova API doesn't allow you to retrieve migration records by UUID,
only ID. This is confusing. Work around it by listing records and
filtering this list.
Change-Id: I932c9c70420e85056509513e005bb78168e70611
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
When trying to list backups of a deleted volume with --volume,
openstackclient fails because the volume does not exist.
However, for listing a volume's backups, the volume itself
does not need to be present.
Fix this issue by allowing the volume of the requested backups
to not exist.
Story: 2009901
Task: 44716
Change-Id: Iea1a567151f427fa0e1ccff3af5cbeab620defcd
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
Add file to the reno documentation build to show release notes for
stable/yoga.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.
Sem-Ver: feature
Change-Id: Ie1126dddd3666d3dc108190133df5e3b085a8404
It is now possible to set extra DHCP option for an existing port using
"port set" command. It works in the same way like during port creation.
Story: 2009095
Task: 42927
Change-Id: I3577d4e3a303137b708ae8687c44b486aa82e296
There may be deployments that only have a volume service but no compute
service, possibly as an intermediate step during the initial setup.
Don't fail the "volume list" command when no compute client can be
initiated.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Idef77bdc8753a456a4c431b0385318dff6581a65
As of compute microversion >= 2.21, support for list and show of server
events for deleted servers was added. This however wasn't working using
the openstackclient because the compute GET /servers/{server_id} will
not return a deleted server, so osc_lib.utils.find_resource() fails to
find the server and the command bails early.
This adds a check for a uuid-like <server> arg and uses it directly if
the <server> cannot be found via find_resource().
A note is also added to the command help to indicate that list and show
for deleted servers will only work if a server ID is passed (name will
not work).
Story: 2009841
Task: 44443
Change-Id: Icd33b3b9a3a1855d7893dd111bbb2aca059f45fd
Only 'server migration list' was being documented.
Change-Id: I038ff2bcf7bb852d619004bb00306d2d388135a7
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The 'remote-managed' vnic type will be used to support off-path
SmartNIC port binding with OVN, and it is expected that the user
will create ports with this vnic type as part of the workflow.
As such the client must allow users to interact with this
vnic type and this patch addresses that.
Partial-Bug: #1932154
Depends-On: I496db96ea40da3bee5b81bcee1edc79e1f46b541
Change-Id: I566c3da594d757dd62edcf7f9ea3077db8d6b11a
With Sphinx==4.4.0 some "helpful" warnings were introduced when an
external link could be replaced by a macro, like for :lpbug:. Sadly we
have a very high number of existing release notes that trigger these
warnings and no good way to fix them retrospectively, because would mess
up their mapping to releases. So we change the logging for the
sphinx.ext.extlinks to ignore these warnings for now.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I709de5e454434b8790a68d9e67ca1432387b21ab
In the new SDK we are going to add additional parameter to the flavor
which make no use for OSC. Exclude it explicitly since it also cause
failing tests.
Change-Id: Ie35e60498cf18f05c878611df6f88607a04b1870
Sometimes it can happen that when extending a volume it is shown as
status "extending" with the original size for a while. Wait for the
volume to enter state "available" again before checking the result.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ib70cfa1c241ce94426214c7a05c550213f427caa
Network objects returned from the SDK include a location column which
has a reference to the cloud to which the object belongs. Add this
column to our fake objects used for testing, so that we can make sure we
don't include them in CLI output where they are useless.
Change-Id: Ib09027af78e7bf2458cdc76ea9027faa3dbbfcf9
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Why limit a user to preset ssh arguments? Capture them all and send
them along to ssh to deal with. This allows users to use the full range of
ssh arguments, including specifying a command to run on the
instance. For example:
openstack server ssh -4 upg -- -l cirros -i ~/id_rsa_upg "date; uptime"
SSH arguments that openstackclient currently mirrors are deprecated
except for -4 and -6, as they are useful for retrieving the correct
instance IP.
Change-Id: Ia50786d5eee52688e180550fe16aeb8af610154b
Co-authored-by: Stephen Finucane <stephen@that.guru>
argparse allows you to specify multiple options for a given argument
when declaring the argument. For some reason, we weren't doing this for
the 'server ssh' command. There's no apparent reason for doing things
this way and it's been that way since the beginning (2013) so let's not
do that.
We also add unit tests since they were missing and should exist.
Change-Id: I67a9e6516d7057266210cd4083e9ddeb1cfaa5de
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The compute API provides this information to us. We might as well use
it.
Change-Id: I5608fa80745975ce49712718452cfe296c0f64d2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We're seeing failures in a recently added tests,
'ServerTests.test_server_add_remove_volume' from
'openstackclient/tests/functional/compute/v2/test_server.py'. These
failures are likely the result of slow CI nodes, but we don't have
enough information in the CI logs to debug them. Starting logging the
various commands executed in tests so that we can see these logs if and
when tests fail.
Change-Id: I4584dc5e6343fe8c8544431a527d8c3c7e7b3c5b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These options are not only valid when modifying a router, but also when
one is created initially.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I3e12901f37cbd1639ac9dc9cc49b04114b80474c
The nova API we're using to delete a server volume attachment needs to
be handed a volume, not a volume attachment.
Also make sure that we create an error if the volume isn't actually
attached to the server.
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I12abd3787ea47acb4da282d00fdc1989405a0564
Fix the issue where the flavor name was empty in server list output.
This requires somewhat invasive unit test changes to reflect the changed
API response from the server, but this has the upside of meaning we
don't need new tests since what we have validates things.
Also drop the flavor ID column as it is removed from the compute API.
Change-Id: Ica3320242a38901c1180b2b29109c9474366fde0
Signed-off-by: Khomesh Thakre <khomeshthakre24@gmail.com>
Story: 2008257
Task: 41113
This has no impact on the end result, but it should make fixing issues
introduced by API microversion 2.69 a little easier.
Change-Id: I7d70eac8aa1a6197ed05a49f071e6899ec219c03
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Switch the server suspend and server resume commands from novaclient to
SDK. Use the SDK versions of test fakes to support fake Server
resources.
Change-Id: Idd0b4f13fab0f238e42844a7d759538bbda24f68
Switch the server pause and server unpause commands from novaclient to
SDK. Use the SDK versions of test fakes to support fake Server
resources.
Change-Id: Id626f06f3d7edd44b306b7fc7b9b00d04af09621
It is supported by Neutron and needs to be done like that when e.g.
admin wants to unbound port from the host.
Task: #44043
Story: #2009705
Change-Id: I08f1bb40f4dc72cfa7c62feeb5f513455de0ca45
Building plugin documentation is failing for aodhclient when running
with latest pyparsing. Drop the plugin from docs for now until the issue
can be fixed.
Needed-By: https://review.opendev.org/c/openstack/requirements/+/818614/
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I1cc1efd9ff2004dd711ed9da0b1d9e8be31175f4
File tests.unit.volume.v2.fakes is modified to provide sdk volume fakes.
File tests.unit.compute.v2.fakes is modified to provide sdk volume
attachment fakes. For test, setup_sdk_volumes_mock() method is created
so that volumes are created in similar way as servers are created.
Change-Id: I290ba83b6ba27a1377ab73fd0ae06ecced25efd1
This was a very difficult command to grok, due to the layering on of
additional features over the years. Make this a little easier to follow
by grouping related logic and making use of argparse features.
Change-Id: I4e1a0aed09ea5d6a8c26ec3e888c9c7b6cefc25a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These clients are intended to fake out the old glanceclient client which
we no longer use. They were only "working" because we weren't actually
using any of the glancelclient-based stuff and were instead overriding
everything within the tests. Move these overrides back to the main
fake client and remove the crud.
Change-Id: I92ee74a1df72a6dd23f9d2dc04342aab0cbd3210
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We're no longer creating fake versions of glanceclient's 'Resource'
object but rather openstacksdk objects. As such, there's no point
nesting things under a fake resource class.
Change-Id: I39cd5302622f4542db9eebcccfad0cb90d077441
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These haven't been used since we switched the image commands from
glanceclient to openstacksdk. There's more cleanup to be done here but
that can be done later.
Change-Id: I3de1f24323886b122b3a30660fb3de18eb7014e9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Switch the server image create command from novaclient to SDK. Use the
SDK versions of test fakes to support fake Server resources. Also,
fetch updated image *after* waiting. If a user requests that we wait
(--wait) for a server image to become active before returning, then we
should probably return the final image. If we don't then the image can
appear to be in a non-active state when it fact it's active. Correct
this by fetching the image after the wait call.
Change-Id: I83a403c035add9ab041ed6d59b5b29e42267f143
The old novaclient.v2.server.Server.interface_attach() method is
replaced with proxy.create_server_interface().
In swargs, 'net_id' and 'port_id' are mutual-exclusive, if one of
them is given with value, the other one cannot be None, as the
API would responde with 400 (None is not string).
In unit test, temporary method 'setup_sdk_servers_mock' is added,
because other tests are still using the old 'setup_servers_mock'.
Functional tests are added. Releasenote is generated.
Change-Id: I9899f0509febc5143560a1859ae6344d0a6d1427
The API behind the 'server add volume' command returns details of the
created volume attachment, however, we were dropping these results
rather than displaying them to the user. Correct this.
Change-Id: I3f7e121220d29422ccf4e6940de2f28bb8496c83
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We should be inheriting from 'ShowOne'. Failure to do so results in a
tuple being dumped to the screen. Not what we intended.
While we're here, we update the docstring of this command to clarify the
command's intent. Nova does not provide an API to retrieve an individual
migration record for a cold migration or completed live migration. As
such, the 'server migration show' command only works for in-progress
live-migrations.
Change-Id: I2e2fe3da7d642b9e8e3d930603dcde178cd68cde
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2009658
Task: 43837
Due to a small logic error, we were emitting a warning about a
deprecated option when the user tried to live migrate an instance using
microversion 2.25 even though the user hadn't actually set that option.
Correct this.
Change-Id: Ib61e817bd4ced9b5533e7c7f9d8f0b45fe81c211
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2009657
Task: 43836
Switch this command from novaclient to SDK. As this is the first command
related to server that we are migrating, we need to extend our test
fakes to support fake Server resources. The extended fakes will replace
the old ones once all commands related to server are switched.
Change-Id: If476fb1614a64320ed071bbda35e941bf3290a2e
There were a number of 'get_osc_show_columns_for_sdk_resource' defined
in-tree. However, osc-lib has provided this method for some time (since
2.2.0, June 2020 [1] - our minimum version is currently 2.3.0) so
there's no need to provide our own copies. Remove them.
[1] https://github.com/openstack/osc-lib/commit/29a0c5a5
Change-Id: I25695f4f9a379dd691b7eaa1e3247164668ae77e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The nova API expects the 'tags' and 'not-tags' filters of the 'GET
/servers' (list servers) API to be a CSV string [1]:
tags (Optional)
A list of tags to filter the server list by. Servers that match all
tags in this list will be returned. Boolean expression in this case
is 't1 AND t2'. Tags in query must be separated by comma.
New in version 2.26
not-tags (Optional)
A list of tags to filter the server list by. Servers that don’t
match all tags in this list will be returned. Boolean expression in
this case is 'NOT (t1 AND t2)'. Tags in query must be separated by
comma.
New in version 2.26
We were instead providing a Python list, which was simply being URL
encoded. Correct this.
[1] https://docs.openstack.org/api-ref/compute/?expanded=list-servers-detail#list-servers
Change-Id: Ie0251a0dccdf3385089e5bbaedf646a5e928cc48
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1946816
There are several update in CLI decoder document.
- Change flavor set/unset to flavor set/unset --property
- Update the mapping with flavor-update, interface-attach, and interface-detach
Change-Id: I1db50188b3643d3fe28689dc73b3f63806defd29
In this patch, Update missing command in Mapping Guide.
List of updated commands
(Nova CLI / OSC)
- server-migration-list / server migration list
- server-migration-show / server migration show
- live-migration-abort / server migration abort
- live-migration-force-complete / server migration force complete
- migration-list / server migration list
- evacuate / server evacuate
- flavor-access-add / flavor set --project
- flavor-access-list / flavor show
- flavor-access-remove / flavor unset
- server-tag-add / server set --tag
- server-tag-delete / server unset --tag
- server-tag-delete-all / server unset --tag
- server-tag-list / server list --tag
- server-tag-set / server set --tag
- quota-class-show / quota show --class
Change-Id: Id1b4980fbc0f6e8e58bfae6f393f9336c6a7e3b1
Delete duplicate return code.
While adding return of a new Member type, the existing return code part is not deleted.
Note the code in fakes.py in the below commit where these codes were added.
- Project: python-openstackclient
- The commit: 60e7c51df4
Change-Id: Iae44770a784732991962cd38472095f76ab2543f
this already exists for server rebuild, but was missing for server
create.
This option is supported from Compute API version >= 2.63, and is only
available for servers booted directly from images (not from volumes,
not from snapshots, and not from images first converted to volumes).
Additionally, this patch removes mentions of
OS_TRUSTED_IMAGE_CERTIFICATE_IDS env var from similar option help string
in server rebuild command as it is not actually implemented yet.
Change-Id: I4e9faea05c499bd91034d1d284c44fdcc8e18db5
before change:
$ tox -e functional -- --regex functional.tests.compute.v2.test_server
after change:
$ tox -e functional -- --regex tests.functional.compute.v2.test_server
the test unit path document should be change the above line.
(fixed wrong letter)
Change-Id: I49674fb0d56ee65c1f6328b9d960b16876173e2d
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: Iedf2c908bf5a9d87effa02717eb604ee8d15ef3b
This microversion drops the duplicate ``id`` field while adding
``attachment_id`` and ``bdm_uuid`` to the output of the
os-volume_attachments API reflected within osc by the ``openstack server
volume list $server``command.
Depends-On: https://review.opendev.org/c/openstack/nova/+/804275
Change-Id: I8a7002d8d65d7795e106b768df868198ab8b8143
Allow configuring hostname when creating a new server or updating or
rebuilding an existing server.
Change-Id: Ibe603eab78bbbec43605f56de62a20493b6aa93d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/python-novaclient/+/806917
openstack server list -c "Created At" command doesn't work
because the wrong variable was used here.
When we receive resp data, Created At data is saved with
the name "created". But in "server.py", we append columns
as created_at. So it seems to print an empty table.
Story: 2009149
Task: 43112
Change-Id: I06de6903d5cc427a8b0fdcd168fec47192f4365b
Currently, the unified client does not have the ability to show the
"Forced Down" field of a GET /os-services response in microversion 2.11
even though the legacy client can.
This adds a "Forced Down" column to the 'openstack compute service list
--long' command output when microversion 2.11 is used.
Story: 2009115
Task: 43011
Change-Id: I10bc2fedbf0e867a990227962b2b6e60f5681f69
The compute APIs are unfortunately inconsistent with regard to the
response parameters for migrations.
* GET /servers/{server_id}/migrations returns server_uuid
* GET /os-migrations returns instance_uuid
Because the 'Server UUID' column is being specified for parsing the
response from GET /os-migrations, it is always showing as an empty
string to users.
There are a few other mismatches between the column names and the REST
API response fields [1]:
* 'Old Flavor' vs 'old_instance_type_id'
* 'New Flavor' vs 'new_instance_type_id'
* 'Type' vs 'migration_type'
This adds a new list containing the REST API response field names to
pass to utils.get_item_properties so that the responses are correctly
parsed and the client output contains the response data instead of
empty strings.
Story: 2009078
Task: 42890
[1] https://docs.openstack.org/api-ref/compute/?expanded=list-migrations-detail#list-migrations
Change-Id: I8aab60619e0225047f6a1c31e44917ca8fcc799e
Currently only the test_server_migration_list adds the 'Id' and 'Type'
columns to the expected output, so if the
test_server_migration_list_no_options test is run by itself, it fails
as the actual response contains 'Id' and 'Type' but the reference does
not. This example run fails:
tox -epy38 test_server_migration_list_no_options
The reason the tests pass in the gate is because
test_server_migration_list (which adds the 'Id' and 'Type' columns to
self.MIGRATION_COLUMNS) appears to always run before
test_server_migration_list_no_options, so the latter test gets the
benefit of the former test's column additions.
This changes the test class to just include the 'Id' and 'Type' columns
all the time as they are always returned in microversion 2.23 anyway.
Story: 2009079
Task: 42891
Change-Id: I2c97e9f64790b5e978e4d04230d45b8e343b53d4
Cinder recently removed their v2 API [1] which is causing the functional
tests to fail. Improve our 'is_service_enabled' test helper to use the
'versions show' command, which queries the service catalog and can give
us information about the service version as well as answer the more
general "is this service available" question. We also resolve a
long-standing TODO in the process.
[1] https://review.opendev.org/c/openstack/cinder/+/792299
Change-Id: I381069357aa008344e15327adf3a863c0c2e1f04
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This closes a gap with cinderclient's 'transfer-create' command.
Change-Id: I7386a7be15c0e3ee87abbcfc2275ba8524c10ff8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2009054
Task: 42831
There is no 'volume group unset' command nor any need for one right now.
This was mistakenly added in I3b2c0cb92b8a53cc1c0cefa3313b80f59c9e5835.
Change-Id: I9386d1350099b10659c6b0e632e4d83cae5b2bfd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The tox option to skip source distribution building is skipsdist,
but this seems to be often misspelled skipdist instead, which gets
silently ignored and so does not take effect. Correct it
everywhere, in hopes that new projects will finally stop copying
this mistake around.
See https://tox.readthedocs.io/en/latest/config.html#conf-skipsdist
and https://github.com/tox-dev/tox/issues/1388 for details.
Change-Id: I05c1cc0c2fbf77021cc1e05bc96bee03528c69f0
Manually changing the server state is a potentially dangerous operation
that should only be done under limited circumstances. It's also an
admin-only operation by default. Highlight both points.
Change-Id: Ifd8aec94937764202131ba8caf6b507caa76d7e9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2008549
Task: 41672
Password injection requires either hypervisor-support or an agent
running in the guest that will talk to the metadata service. It can be
disabled for a deployment using the '[api] enable_instance_password'
nova config option. Indicate this, albeit briefly.
Change-Id: Ief94ea07fc7ab6a487af972e8759ca6704d8f085
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add an additional '--no-property' option to the 'volume backup set'
command, along with a brand spanking new 'volume backup unset' command.
Change-Id: Id7ca925e0ada03e259f0ecaf3e02af11c900641e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These mirror the 'cinder group-snapshot-*' commands, with arguments
copied across essentially verbatim. The only significant departure is
the replacement of "tenant" terminology with "project".
volume group snapshot create
volume group snapshot delete
volume group snapshot list
volume group snapshot show
Change-Id: Ia5084749b7c1a5a936fd6d6e8d89b9b80969f68c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We use singular form for delete command argument in all places.
This commit replaces conntrack-helper-ids with a singular form.
The only visible change is a fix for the help message below.
openstack network l3 conntrack helper delete
<router>
<conntrack-helper-ids>
[<conntrack-helper-ids> ...]
Change-Id: I50bbd9f6199071bb86cbb2f37c45ebda1de58433
Neutron has got CRUD API for L3 conntrack helper since some time.
This patch adds support for it in the OSC.
OpenStack SDK supports that since [1]
This patch also bumps minimum OpenStack SDK version to
the 0.56.0 as that version introduced support for the
Neutron's L3 conntrack helper.
[1] https://review.opendev.org/c/openstack/openstacksdk/+/782870
Change-Id: I55604182ae50b6ad70c8bc1f7efad8859f191269
These mirror the 'cinder group-type-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
merging of some commands, such as 'group-type-default' and
'group-type-list' into 'group type list', and 'group-type-update' and
'group-type-key' into 'group type set/unset'.
volume group type create
volume group type delete
volume group type list
volume group type show
volume group type set
volume group type unset
Change-Id: Iee6ee2f1f276e6ef6f75a74f8f2980f14c0d5e2f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These mirror the 'cinder group-*' commands, with arguments copied across
essentially verbatim. The only significant departures are the
replacement of "tenant" terminology with "project" and the merging of
the various volume group replication action commands into the parent
volume group (e.g. 'openstack volume group set --enable-replication'
instead of 'cinder group enable-replication')
volume group create
volume group delete
volume group list
volume group show
volume group set
volume group failover
Change-Id: I3b2c0cb92b8a53cc1c0cefa3313b80f59c9e5835
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
There are more types than just volume types.
Change-Id: I6af66f966a221437ff79fabcb0b81fd38586fe67
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add a couple of missing options to each command:
volume backup create
--no-incremental
--property
--availability-zone
volume backup set
--property
Most of these are version dependent so we add the relevant version
checks as part of this work. While we're here, we also make the
formatting a little easier on the eye in places.
Change-Id: I328d5c981cb32b2ee9a4b1bd43aa36b22347ff63
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This patch implements the necessary commands to utilize the Messages API
introduced in Cinder API version 3.3. Version 3.5 built upon this by
implementing pagination support for these commands which is present in
this patch as well.
volume message get
volume message list
volume message delete
Change-Id: I64aa0b4a8d4468baa8c63e5e30ee31de68df999d
These mirror the 'cinder attachment-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
replacement of "tenant" terminology with "project".
volume attachment create
volume attachment delete
volume attachment list
volume attachment complete
volume attachment set
volume attachment show
Full support for filtering is deferred for now since that's a more
complicated change that requires additional commands be added first.
TODOs are included to this effect.
Change-Id: If47c2b56fe65ee2cee07c000d6ae3688d5ef3b42
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Copy the API version checks from the 'openstackclient.compute.client'
module. These will only be necessary until we migrate everything to SDK
but it's very helpful until then.
Change-Id: I2d9c68db5bf891ffa25fd5a7fc9e8953e44b73ab
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Done manually by looking at the help text for the 'neutron' client
(version 7.1.1) and identifying gaps.
Change-Id: Ib029b2c236f79a0ca6f64834f069db2be4332ea8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Done manually by looking at the help text for the 'glance' client
(version 3.1.1) and identifying gaps.
Change-Id: Ic46bbdef7182e5f707cd5083868886ce60c7eb47
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Done manually by looking at the help text for the 'nova' client
(version 17.0.0) and identifying gaps.
Change-Id: I23a4947a13d5e576c5aa66902686df60379ffda0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Done manually by looking at the help text for the 'cinder' client
(version 7.0.0) and identifying gaps.
Change-Id: Ib16c7e9dfa47a93d8b077f0e3e5bbd5bf8984ec3
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This makes it easier to get the total list of aggregates and the hosts
belonging to each of them (specially for scripting purposes).
Change-Id: I94833c15075ae655bc11e7c0fc47c0abad5846fc
Signed-off-by: David Caro <me@dcaro.es>
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: I7e43e43bc5a24f49aa7b225502e5d0176fef3783
Devstack recently switched default Neutron's backend from ML2/OVS to
ML2/OVN. As OVN backend has some parity gaps and differences in some
APIs, functional tests job was failing with ML2/OVN as some tests
weren't properly skipped in case of missing some Neutron API extensions.
This patch fixes that by doing some small changes in the functional
tests:
- skip DHCP/L3 agent tests when dhcp/l3 agent scheduler extensions
aren't available,
- skip updating neutron agent as OVN agents don't allows that,
- skip service providers tests when there is no Neutron L3 agent
available,
- skip setting router as distributed as OVN backend don't supports that
router's attribute at all.
Depends-On: https://review.opendev.org/c/openstack/neutron/+/793141
Change-Id: I29a8db202086b0b49fed865409fa8ca244b98439
To deprecate and drop support for neutronclient CLI and use only
OSC we need feature parity between OSC and neutronclient.
Last missing piece here is possibility to send in POST/PUT requests
unknown parameters to the Neutron server.
This patch adds such possibility to the OSC.
Change-Id: Iba09297c2be9fb9fa0be1b3dc65755277b79230e
Update the help strings for these two arguments to indicate their
deprecated nature. This was previously flagged via a deprecation warning
but users would only see that if they were to run the command.
Change-Id: I31a5e27ac8bd2625a6073b54a51bf3e8d6126c8c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Neutron team recently switched default backend used in Neutron
by Devstack to OVN. With that backend some tests, like e.g. related
to DHCP or L3 agents aren't working fine. So to have still the same
test coverage as we had before, let's explicitly set ML2/OVS as a
Neutron's backend in those CI jobs.
Change-Id: Idf6466a59c6cf96be2f1d53e696f0564584fa233
The egg for the keystoneauth project is actually called keystonauth1.
Seems newer pip actually complains about the difference and fails.
Change-Id: I1602832d33cd467745a03b36c9b1545cd069ba1d
The --protected, --unprotected, --public, --shared, --community,
--private flags were ignored when using --volume.
Change-Id: Id5c05ef7d7bb0a04b9d7a9d821e544e1ff7b3d28
Story: 2008882
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: I0bbffbec8889b8b3067cfe17d258f5cb16624f38
This is no longer an issue in our new Python 3-only world.
Change-Id: I25c31a0b7f76a253499d9713ba48fd7ba7168450
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: I848e21bf2d2ea1a1a132525070e5f20d7ff8478d
When the openstacksdk is patched to properly support defining prefix
lengths when creating subnets, the resulting subnet show output
reveals a prefix_length column with a value of 'none'. This patch
hides the prefix_length column.
Change-Id: I59dfb0b1585ed624f9d82b3557df2ff5ff9d1b3e
Partial-Bug: 1754062
Depends-On: https://review.openstack.org/#/c/550558/
When we create a network qos rule we need specify the type so that we
can call the corresponding API. It's not possible to use the command
without the type so mark it as required. This was already being done
but inline.
Change-Id: I559f884bac198d2c69e800620aef66b200473418
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is essentially a partial revert of change
I94aa7a9824e44f9585ffb45e5e7637b9588539b4, which removed some deprecated
commands like 'openstack snapshot *' in favour of 'openstack volume
snapshot *'. Unfortunately the latter appeared to have no test coverage
and were relying on tests for the former to validate behavior. Re-add
the tests removed back then.
Change-Id: Ib2cd975221034c8997d272d43cfb18acefc319fe
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The neutron API supports filtering subnets by subnet
pool id, but the CLI was missing support for it.
Change-Id: Ic230c2c5cda8255d8f2c422880aeac81670b2df3
This is helpful to automate code style checks at runtime. We include
documentation on how to run this as well as a general overview of style
guidelines in OSC.
Change-Id: I2dc5a0f760ce53269ae25677560b2611cc6bfd91
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
SDK starts caching token in keyring (when available and configured). A
small change is required in OSC not to reject this state.
Overall this helps avoiding reauthentication upon next openstack call.
If token is not valid anymore automatically reauthentication is done.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/735352
Depends-On: https://review.opendev.org/c/openstack/osc-lib/+/765650
Change-Id: I47261a32bd3b106a589974d3de5bf2a6ebd57263
As noted, we're simply testing the default behavior of Python 3 in this
test. Remove it, now that this is the only version(s) of Python 3 we
have to worry about.
Change-Id: I5f07343df8334457d907086033d5685f59c0bf0e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-11-06 10:16:06 +00:00
761 changed files with 92752 additions and 55301 deletions
backup-update,volume backup set,Updates a backup. (Supported by API versions 3.9 - 3.latest)
cgsnapshot-create,consistency group snapshot create,Creates a cgsnapshot.
cgsnapshot-create,consistency group snapshot create,Creates a cgsnapshot.
cgsnapshot-delete,consistency group snapshot delete,Removes one or more cgsnapshots.
cgsnapshot-delete,consistency group snapshot delete,Removes one or more cgsnapshots.
cgsnapshot-list,consistency group snapshot list,Lists all cgsnapshots.
cgsnapshot-list,consistency group snapshot list,Lists all cgsnapshots.
cgsnapshot-show,consistency group snapshot show,Shows cgsnapshot details.
cgsnapshot-show,consistency group snapshot show,Shows cgsnapshot details.
cluster-disable,block storage cluster set --disable,Disables clustered services. (Supported by API versions 3.7 - 3.latest)
cluster-enable,block storage cluster set --enable,Enables clustered services. (Supported by API versions 3.7 - 3.latest)
cluster-list,block storage cluster list,Lists clustered services with optional filtering. (Supported by API versions 3.7 - 3.latest)
cluster-show,block storage cluster show,Show detailed information on a clustered service. (Supported by API versions 3.7 - 3.latest)
consisgroup-create,consistency group create,Creates a consistency group.
consisgroup-create,consistency group create,Creates a consistency group.
consisgroup-create-from-src,consistency group create --consistency-group-snapshot,Creates a consistency group from a cgsnapshot or a source CG
consisgroup-create-from-src,consistency group create --consistency-group-snapshot,Creates a consistency group from a cgsnapshot or a source CG
consisgroup-delete,consistency group delete,Removes one or more consistency groups.
consisgroup-delete,consistency group delete,Removes one or more consistency groups.
@ -19,25 +31,50 @@ consisgroup-list,consistency group list,Lists all consistencygroups.
consisgroup-show,consistency group show,Shows details of a consistency group.
consisgroup-show,consistency group show,Shows details of a consistency group.
consisgroup-update,consistency group set,Updates a consistencygroup.
consisgroup-update,consistency group set,Updates a consistencygroup.
create,volume create,Creates a volume.
create,volume create,Creates a volume.
credentials,WONTFIX,Shows user credentials returned from auth.
delete,volume delete,Removes one or more volumes.
delete,volume delete,Removes one or more volumes.
encryption-type-create,volume type create --encryption-provider --enc..,Creates encryption type for a volume type. Admin only.
encryption-type-create,volume type create --encryption-provider --enc..,Creates encryption type for a volume type. Admin only.
encryption-type-delete,volume type delete,Deletes encryption type for a volume type. Admin only.
encryption-type-delete,volume type delete,Deletes encryption type for a volume type. Admin only.
encryption-type-list,volume type list --encryption-type,Shows encryption type details for volume types. Admin only.
encryption-type-list,volume type list --encryption-type,Shows encryption type details for volume types. Admin only.
encryption-type-show,volume type list --encryption-show,Shows encryption type details for volume type. Admin only.
encryption-type-show,volume type list --encryption-show,Shows encryption type details for volume type. Admin only.
encryption-type-update,volume type set --encryption-provider --enc..,Update encryption type information for a volume type (Admin Only).
encryption-type-update,volume type set --encryption-provider --enc..,Update encryption type information for a volume type (Admin Only).
endpoints,catalog list,Discovers endpoints registered by authentication service.
extend,volume set --size,Attempts to extend size of an existing volume.
extend,volume set --size,Attempts to extend size of an existing volume.
extra-specs-list,volume type list --long,Lists current volume types and extra specs.
extra-specs-list,volume type list --long,Lists current volume types and extra specs.
failover-host,volume host failover,Failover a replicating cinder-volume host.
failover-host,volume host failover,Failover a replicating cinder-volume host.
force-delete,volume delete --force,"Attempts force-delete of volume, regardless of state."
force-delete,volume delete --force,"Attempts force-delete of volume regardless of state."
freeze-host,volume host set --disable,Freeze and disable the specified cinder-volume host.
freeze-host,volume host set --disable,Freeze and disable the specified cinder-volume host.
get-capabilities,volume backend capability show,Show capabilities of a volume backend. Admin only.
get-capabilities,volume backend capability show,Show capabilities of a volume backend. Admin only.
get-pools,volume backend pool list,Show pool information for backends. Admin only.
get-pools,volume backend pool list,Show pool information for backends. Admin only.
group-create,volume group create,Creates a group. (Supported by API versions 3.13 - 3.latest)
group-create-from-src,volume group create [--source-group|--group-snapshot],Creates a group from a group snapshot or a source group. (Supported by API versions 3.14 - 3.latest)
group-delete,volume group delete,Removes one or more groups. (Supported by API versions 3.13 - 3.latest)
group-disable-replication,volume group set --disable-replication,Disables replication for group. (Supported by API versions 3.38 - 3.latest)
group-enable-replication,volume group set --enable-replication,Enables replication for group. (Supported by API versions 3.38 - 3.latest)
group-failover-replication,volume group failover,Fails over replication for group. (Supported by API versions 3.38 - 3.latest)
group-list,volume group list,Lists all groups. (Supported by API versions 3.13 - 3.latest)
group-list-replication-targets,volume group list --replication-targets,Lists replication targets for group. (Supported by API versions 3.38 - 3.latest)
group-show,volume group show,Shows details of a group. (Supported by API versions 3.13 - 3.latest)
group-snapshot-create,volume group snapshot create,Creates a group snapshot. (Supported by API versions 3.14 - 3.latest)
group-snapshot-delete,volume group snapshot delete,Removes one or more group snapshots. (Supported by API versions 3.14 - 3.latest)
group-snapshot-list,volume group snapshot list,Lists all group snapshots. (Supported by API versions 3.14 - 3.latest)
group-snapshot-show,volume group snapshot show,Shows group snapshot details. (Supported by API versions 3.14 - 3.latest)
group-specs-list,volume group type list,Lists current group types and specs. (Supported by API versions 3.11 - 3.latest)
group-type-create,volume group type create,Creates a group type. (Supported by API versions 3.11 - 3.latest)
group-type-default,volume group type list --default,List the default group type. (Supported by API versions 3.11 - 3.latest)
group-type-delete,volume group type delete,Deletes group type or types. (Supported by API versions 3.11 - 3.latest)
group-type-key,volume group type set,Sets or unsets group_spec for a group type. (Supported by API versions 3.11 - 3.latest)
group-type-list,volume group type set,Lists available 'group types'. (Admin only will see private types) (Supported by API versions 3.11 - 3.latest)
group-type-show,volume group type show,Show group type details. (Supported by API versions 3.11 - 3.latest)
group-type-update,volume group type set,Updates group type name description and/or is_public. (Supported by API versions 3.11 - 3.latest)
group-update,volume group set,Updates a group. (Supported by API versions 3.13 - 3.latest)
image-metadata,volume set --image-property,Sets or deletes volume image metadata.
image-metadata,volume set --image-property,Sets or deletes volume image metadata.
cache-clear,cached image clear,"Clear all images from cache, queue or both."
cache-delete,cached image delete,Delete image from cache/caching queue.
cache-list,cached image list,Get cache state.
cache-queue,cached image queue,Queue image(s) for caching.
explain,WONTFIX,Describe a specific model.
explain,WONTFIX,Describe a specific model.
image-create,image create,Create a new image.
image-create,image create,Create a new image.
image-create-via-import, image create --import,"EXPERIMENTAL: Create a new image via image import using glance-direct import method. Missing support for web-download, copy-image and glance-download import methods. The OSC command is also missing support for importing image to specified store as well as all stores (--store, --stores, --all-stores) and skip or stop processing if import fails to one of the store (--allow-failure)"
image-deactivate,image set --deactivate,Deactivate specified image.
image-deactivate,image set --deactivate,Deactivate specified image.
image-delete,image delete,Delete specified image.
image-delete,image delete,Delete specified image.
image-download,image save,Download a specific image.
image-download,image save,Download a specific image.
image-import,image import,Initiate the image import taskflow.
image-list,image list,List images you can access.
image-list,image list,List images you can access.
image-reactivate,image set --activate,Reactivate specified image.
image-reactivate,image set --activate,Reactivate specified image.
image-show,image show,Describe a specific image.
image-show,image show,Describe a specific image.
image-stage,image stage,Upload data for a specific image to staging.
image-tag-delete,image unset --tag <tag>,Delete the tag associated with the given image.
image-tag-delete,image unset --tag <tag>,Delete the tag associated with the given image.
image-tag-update,image set --tag <tag>,Update an image with the given tag.
image-tag-update,image set --tag <tag>,Update an image with the given tag.
image-tasks,,Get tasks associated with image.
image-update,image set,Update an existing image.
image-update,image set,Update an existing image.
image-upload,,Upload data for a specific image.
image-upload,,Upload data for a specific image.
import-info,image import info,Show available import methods from Glance.
location-add,,Add a location (and related metadata) to an image.
location-add,,Add a location (and related metadata) to an image.
location-delete,,Remove locations (and related metadata) from an image.
location-delete,,Remove locations (and related metadata) from an image.
location-update,,Update metadata of an image's location.
location-update,,Update metadata of an image's location.
md-namespace-create,image metadef namespace create,Create a new metadata definitions namespace.
md-namespace-delete,image metadef namespace delete,Delete specified metadata definitions namespace with its contents.
md-namespace-import,WONTFIX,Import a metadata definitions namespace from file or standard input.
member-list,,Describe sharing permissions by image.
member-get,image member get,Show details of an image member
member-list,image member list,Describe sharing permissions by image.
member-update,image set --accept --reject --status,Update the status of a member for a given image.
member-update,image set --accept --reject --status,Update the status of a member for a given image.
task-create,,Create a new task.
stores-delete,image delete --store,Delete image from specific store.
task-list,,List tasks you can access.
stores-info,,Print available backends from Glance.
task-show,,Describe a specific task.
task-create,WONTFIX,Create a new task.
task-list,image task list,List tasks you can access.
task-show,image task show,Describe a specific task.
usage,,Get quota usage information.
bash-completion,complete,Prints arguments for bash_completion.
bash-completion,complete,Prints arguments for bash_completion.
help,help,Display help about this program or one of its subcommands.
help,help,Display help about this program or one of its subcommands.
1
explain
cache-clear
WONTFIX
cached image clear
Describe a specific model.
Clear all images from cache, queue or both.
1
cache-clear
cached image clear
Clear all images from cache, queue or both.
2
cache-delete
cached image delete
Delete image from cache/caching queue.
3
cache-list
cached image list
Get cache state.
4
cache-queue
cached image queue
Queue image(s) for caching.
5
explain
explain
WONTFIX
WONTFIX
Describe a specific model.
Describe a specific model.
6
image-create
image-create
image create
image create
Create a new image.
Create a new image.
7
image-create-via-import
image create --import
EXPERIMENTAL: Create a new image via image import using glance-direct import method. Missing support for web-download, copy-image and glance-download import methods. The OSC command is also missing support for importing image to specified store as well as all stores (--store, --stores, --all-stores) and skip or stop processing if import fails to one of the store (--allow-failure)
8
image-deactivate
image-deactivate
image set --deactivate
image set --deactivate
Deactivate specified image.
Deactivate specified image.
9
image-delete
image-delete
image delete
image delete
Delete specified image.
Delete specified image.
10
image-download
image-download
image save
image save
Download a specific image.
Download a specific image.
11
image-import
image import
Initiate the image import taskflow.
12
image-list
image-list
image list
image list
List images you can access.
List images you can access.
13
image-reactivate
image-reactivate
image set --activate
image set --activate
Reactivate specified image.
Reactivate specified image.
14
image-show
image-show
image show
image show
Describe a specific image.
Describe a specific image.
15
image-stage
image stage
Upload data for a specific image to staging.
16
image-tag-delete
image-tag-delete
image unset --tag <tag>
image unset --tag <tag>
Delete the tag associated with the given image.
Delete the tag associated with the given image.
17
image-tag-update
image-tag-update
image set --tag <tag>
image set --tag <tag>
Update an image with the given tag.
Update an image with the given tag.
18
image-tasks
Get tasks associated with image.
19
image-update
image-update
image set
image set
Update an existing image.
Update an existing image.
20
image-upload
image-upload
Upload data for a specific image.
Upload data for a specific image.
21
import-info
image import info
Show available import methods from Glance.
22
location-add
location-add
Add a location (and related metadata) to an image.
Add a location (and related metadata) to an image.
23
location-delete
location-delete
Remove locations (and related metadata) from an image.
Remove locations (and related metadata) from an image.
24
location-update
location-update
Update metadata of an image's location.
Update metadata of an image's location.
25
md-namespace-create
image metadef namespace create
Create a new metadata definitions namespace.
26
md-namespace-delete
image metadef namespace delete
Delete specified metadata definitions namespace with its contents.
27
md-namespace-import
WONTFIX
Import a metadata definitions namespace from file or standard input.
28
md-namespace-list
image metadef namespace list
List metadata definitions namespaces.
29
md-namespace-objects-delete
image metadef object delete
Delete all metadata definitions objects inside a specific namespace.
30
md-namespace-properties-delete
image metadef property delete
Delete all metadata definitions property inside a specific namespace.
31
md-namespace-resource-type-list
image metadef resource type association list
List resource types associated to specific namespace.
32
md-namespace-show
image metadef namespace show
Describe a specific metadata definitions namespace.
33
md-namespace-tags-delete
Delete all metadata definitions tags inside a specific namespace.
34
md-namespace-update
Update an existing metadata definitions namespace.
35
md-object-create
image metadef object create
Create a new metadata definitions object inside a namespace.
36
md-object-show
image metadef object show
Describe a specific metadata definitions object inside a namespace.
37
md-object-list
image metadef object list
List metadata definitions objects inside a specific namespace.
38
md-object-delete
image metadef object delete
Delete a specific metadata definitions object inside a namespace.
39
md-object-property-show
image metadef object property show
Describe a specific metadata definitions property inside an object.
40
md-object-update
image metadef object update
Update metadata definitions object inside a namespace.
41
md-property-create
image metadef property create
Create a new metadata definitions property inside a namespace.
42
md-property-delete
image metadef property delete
Delete a specific metadata definitions property inside a namespace.
43
md-property-list
image metadef property list
List metadata definitions properties inside a specific namespace.
44
md-property-show
image metadef property show
Describe a specific metadata definitions property inside a namespace.
45
md-property-update
image metadef property set
Update metadata definitions property inside a namespace.
46
md-resource-type-associate
image metadef resource type association create
Associate resource type with a metadata definitions namespace.
47
md-resource-type-deassociate
image metadef resource type association delete
Deassociate resource type with a metadata definitions namespace.
48
md-resource-type-list
image metadef resource type list
List available resource type names.
49
md-tag-create
Add a new metadata definitions tag inside a namespace.
50
md-tag-create-multiple
Create new metadata definitions tags inside a namespace.
51
md-tag-delete
Delete a specific metadata definitions tag inside a namespace.
52
md-tag-list
List metadata definitions tags inside a specific namespace.
53
md-tag-show
Describe a specific metadata definitions tag inside a namespace.
54
md-tag-update
Rename a metadata definitions tag inside a namespace.
55
member-create
member-create
image add project
image add project
Create member for a given image.
Create member for a given image.
56
member-delete
member-delete
image remove project
image remove project
Delete image member.
Delete image member.
57
member-list
member-get
image member get
Describe sharing permissions by image.
Show details of an image member
58
member-list
image member list
Describe sharing permissions by image.
59
member-update
member-update
image set --accept --reject --status
image set --accept --reject --status
Update the status of a member for a given image.
Update the status of a member for a given image.
60
task-create
stores-delete
image delete --store
Create a new task.
Delete image from specific store.
61
task-list
stores-info
List tasks you can access.
Print available backends from Glance.
62
task-show
task-create
WONTFIX
Describe a specific task.
Create a new task.
63
task-list
image task list
List tasks you can access.
64
task-show
image task show
Describe a specific task.
65
usage
Get quota usage information.
66
bash-completion
bash-completion
complete
complete
Prints arguments for bash_completion.
Prints arguments for bash_completion.
67
help
help
help
help
Display help about this program or one of its subcommands.
Display help about this program or one of its subcommands.
aggregate-add-host,aggregate add host,Add the host to the specified aggregate.
aggregate-add-host,aggregate add host,Add the host to the specified aggregate.
aggregate-cache-images,aggregate cache image,Request images be cached. (Supported by API versions '2.81' - '2.latest') [hint: use '-- os-compute-api-version' flag to show help message for proper version]
aggregate-create,aggregate create,Create a new aggregate with the specified details.
aggregate-create,aggregate create,Create a new aggregate with the specified details.
aggregate-delete,aggregate delete,Delete the aggregate.
aggregate-delete,aggregate delete,Delete the aggregate.
aggregate-list,aggregate list,Print a list of all aggregates.
aggregate-list,aggregate list,Print a list of all aggregates.
@ -15,51 +15,42 @@ aggregate-update,aggregate set / unset,Update the aggregate's name and optionall
availability-zone-list,availability zone list,List all the availability zones.
availability-zone-list,availability zone list,List all the availability zones.
backup,server backup create,Backup a server by creating a 'backup' type snapshot.
backup,server backup create,Backup a server by creating a 'backup' type snapshot.
boot,server create,Boot a new server.
boot,server create,Boot a new server.
cell-capacities,,Get cell capacities for all cells or a given cell.
clear-password,server set --root-password,Clear the admin password for a server from the metadata server. This action does not actually change the instance server password.
cell-show,,Show details of a given cell.
clear-password,server set --root-password,Clear the admin password for a server from the metadata server.
cloudpipe-configure,WONTFIX,Update the VPN IP/port of a cloudpipe instance.
cloudpipe-create,WONTFIX,Create a cloudpipe instance for the given project.
cloudpipe-list,WONTFIX,Print a list of all cloudpipe instances.
console-log,console log show,Get console log output of a server.
console-log,console log show,Get console log output of a server.
delete,server delete,Immediately shut down and delete specified server(s).
delete,server delete,Immediately shut down and delete specified server(s).
diagnostics,openstack server show --diagnostics,Retrieve server diagnostics.
diagnostics,openstack server show --diagnostics,Retrieve server diagnostics.
evacuate,,Evacuate server from failed host.
evacuate,server evacuate,Evacuate server from failed host.
flavor-access-add,,Add flavor access for the given tenant.
flavor-access-add,flavor set --project,Add flavor access for the given tenant.
flavor-access-list,,Print access information about the given flavor.
flavor-access-list,flavor show,Print access information about the given flavor.
flavor-access-remove,,Remove flavor access for the given tenant.
flavor-access-remove,flavor unset,Remove flavor access for the given tenant.
flavor-create,flavor create,Create a new flavor.
flavor-create,flavor create,Create a new flavor.
flavor-delete,flavor delete,Delete a specific flavor
flavor-delete,flavor delete,Delete a specific flavor
flavor-key,flavor set / unset,Set or unset extra_spec for a flavor.
flavor-key,flavor set / unset --property,Set or unset extra_spec for a flavor.
flavor-list,flavor list,Print a list of available 'flavors'
flavor-list,flavor list,Print a list of available 'flavors'
flavor-show,flavor show,Show details about the given flavor.
flavor-show,flavor show,Show details about the given flavor.
floating-ip-associate,server add floating ip,Associate a floating IP address to a server.
flavor-update,flavor set --description,Update the description of an existing flavor. (Supported by API versions '2.55' - '2.latest') [hint: use '--os-compute-api-version' flag to show help message for proper version]
floating-ip-disassociate,server remove floating ip,Disassociate a floating IP address from a server.
force-delete,server delete,Force delete a server.
force-delete,server delete,Force delete a server.
get-mks-console,console url show --mks,Get an MKS console to a server.
get-mks-console,console url show --mks,Get an MKS console to a server. (Supported by API versions '2.8' - '2.latest') [hint: use ' --os-compute-api-version' flag to show help message for proper version]
get-password,WONTFIX,Get the admin password for a server.
get-password,WONTFIX,Get the admin password for a server. This operation calls the metadata service to query metadata information and does not read password information from the server itself.
get-rdp-console,console url show --rdp,Get a rdp console to a server.
get-rdp-console,console url show --rdp,Get a rdp console to a server.
get-serial-console,console url show --serial,Get a serial console to a server.
get-serial-console,console url show --serial,Get a serial console to a server.
get-spice-console,console url show --spice,Get a spice console to a server.
get-spice-console,console url show --spice,Get a spice console to a server.
get-vnc-console,console url show --novnc | --xvpvnc,Get a vnc console to a server.
get-vnc-console,console url show --novnc,Get a vnc console to a server.
host-action,,Perform a power action on a host.
host-evacuate,WONTFIX,Evacuate all instances from failed host.
host-describe,host show,Describe a specific host.
host-evacuate-live,WONTFIX,Live migrate all instances off the specified host to other available hosts.
host-evacuate,,Evacuate all instances from failed host.
host-meta,WONTFIX,Set or Delete metadata on all instances of a host.
host-evacuate-live,,Live migrate all instances off the specified host to other available hosts.
host-servers-migrate,WONTFIX,Cold migrate all instances off the specified host to other available hosts.
host-list,host list,List all hosts by service.
hypervisor-list,hypervisor list,List hypervisors. (Supported by API versions '2.0' - '2.latest')
host-meta,,Set or Delete metadata on all instances of a host.
hypervisor-servers,server list --host,List servers belonging to specific hypervisors.
host-servers-migrate,,Cold migrate all instances off the specified host to other available hosts.
host-update,host set,Update host settings.
hypervisor-list,hypervisor list,List hypervisors.
hypervisor-servers,,List servers belonging to specific hypervisors.
hypervisor-show,hypervisor show,Display the details of the specified hypervisor.
hypervisor-show,hypervisor show,Display the details of the specified hypervisor.
hypervisor-stats,hypervisor stats show,Get hypervisor statistics over all compute nodes.
hypervisor-stats,hypervisor stats show,Get hypervisor statistics over all compute nodes.
hypervisor-uptime,,Display the uptime of the specified hypervisor.
hypervisor-uptime,hypervisor show,Display the uptime of the specified hypervisor.
image-create,server image create,Create a new image by taking a snapshot of a running server.
image-create,server image create,Create a new image by taking a snapshot of a running server.
instance-action,,Show an action.
instance-action,server event show,Show an action.
instance-action-list,,List actions on a server.
instance-action-list,server event list,List actions on a server.
interface-attach,,Attach a network interface to a server.
instance-usage-audit-log,WONTFIX,List/Get server usage audits.
interface-detach,,Detach a network interface from a server.
interface-attach,server add port / server add floating ip / server add fixed ip,Attach a network interface to a server.
interface-detach,server remove port,Detach a network interface from a server.
interface-list,port list --server,List interfaces attached to a server.
interface-list,port list --server,List interfaces attached to a server.
keypair-add,keypair create,Create a new key pair for use with servers.
keypair-add,keypair create,Create a new key pair for use with servers.
keypair-delete,keypair delete,Delete keypair given by its name.
keypair-delete,keypair delete,Delete keypair given by its name.
@ -67,26 +58,24 @@ keypair-list,keypair list,Print a list of keypairs for a user
keypair-show,keypair show,Show details about the given keypair.
keypair-show,keypair show,Show details about the given keypair.
limits,limits show,Print rate and absolute limits.
limits,limits show,Print rate and absolute limits.
list,server list,List active servers.
list,server list,List active servers.
list-extensions,extension list,List all the os-api extensions that are available.
list-secgroup,security group list,List Security Group(s) of a server.
list-secgroup,security group list,List Security Group(s) of a server.
live-migration,,Migrate running server to a new machine.
live-migration,server migration list,Migrate running server to a new machine.
live-migration-abort,,Abort an on-going live migration.
live-migration-abort,server migration abort,Abort an on-going live migration.
live-migration-force-comp,,Force on-going live migration to complete.
live-migration-force-comp,server migration force complete,Force on-going live migration to complete.
lock,server lock,Lock a server.
lock,server lock,Lock a server.
meta,server set --property / unset,Set or delete metadata on a server.
meta,server set --property / unset,Set or delete metadata on a server.
migrate,server migrate,Migrate a server. The new host will be selected by the scheduler.
migrate,server migrate,Migrate a server. The new host will be selected by the scheduler.
migration-list,,Print a list of migrations.
migration-list,server migration list,Print a list of migrations.
pause,server pause,Pause a server.
pause,server pause,Pause a server.
quota-class-show,,List the quotas for a quota class.
quota-class-show,quota show --class,List the quotas for a quota class.
quota-class-update,quota set --class,Update the quotas for a quota class.
quota-class-update,quota set --class,Update the quotas for a quota class.
quota-defaults,quota list,List the default quotas for a tenant.
quota-defaults,quota list,List the default quotas for a tenant.
quota-delete,quota set,Delete quota for a tenant/user so their quota will Revert back to default.
quota-delete,quota delete --compute,Delete quota for a tenant/user so their quota will Revert back to default.
quota-show,quota show,List the quotas for a tenant/user.
quota-show,quota show,List the quotas for a tenant/user.
quota-update,quota set,Update the quotas for a tenant/user.
quota-update,quota set,Update the quotas for a tenant/user.
reboot,server reboot,Reboot a server.
reboot,server reboot,Reboot a server.
rebuild,server rebuild,"Shutdown, re-image, and re-boot a server."
rebuild,server rebuild,"Shutdown, re-image, and re-boot a server."
refresh-network,WONTFIX,Refresh server network information.
refresh-network,WONTFIX,Refresh server network information.
remove-fixed-ip,server remove fixed ip,Remove an IP address from a server.
remove-secgroup,server remove security group,Remove a Security Group from a server.
remove-secgroup,server remove security group,Remove a Security Group from a server.
rescue,server rescue,Reboots a server into rescue mode.
rescue,server rescue,Reboots a server into rescue mode.
reset-network,WONTFIX,Reset network of a server.
reset-network,WONTFIX,Reset network of a server.
@ -100,13 +89,14 @@ server-group-create,server group create,Create a new server group with the speci
server-group-delete,server group delete,Delete specific server group(s).
server-group-delete,server group delete,Delete specific server group(s).
server-group-get,server group show,Get a specific server group.
server-group-get,server group show,Get a specific server group.
server-group-list,server group list,Print a list of all server groups.
server-group-list,server group list,Print a list of all server groups.
server-migration-list,,Get the migrations list of specified server.
server-migration-list,server migration list,Get the migrations list of specified server.
server-migration-show,,Get the migration of specified server.
server-migration-show,server migration show,Get the migration of specified server.
server-tag-add,,Add one or more tags to a server.
server-tag-add,server set --tag,Add one or more tags to a server.
server-tag-delete,,Delete one or more tags from a server.
server-tag-delete,server unset --tag,Delete one or more tags from a server.
server-tag-delete-all,,Delete all tags from a server.
server-tag-delete-all,server unset --tag,Delete all tags from a server.
server-tag-list,,Get list of tags from a server.
server-tag-list,server list --tag,Get list of tags from a server.
server-tag-set,,Set list of tags to a server.
server-tag-set,server set --tag,Set list of tags to a server.
server-topology,openstack server show --topology,Retrieve server topology. (Supported by API versions '2.78' - '2.latest') [hint: use '-- os-compute-api-version' flag to show help message for proper version]
service-delete,compute service delete,Delete the service.
service-delete,compute service delete,Delete the service.
service-disable,compute service set --disable,Disable the service.
service-disable,compute service set --disable,Disable the service.
service-enable,compute service set --enable,Enable the service.
service-enable,compute service set --enable,Enable the service.
@ -121,22 +111,17 @@ start,server start,Start the server(s).
stop,server stop,Stop the server(s).
stop,server stop,Stop the server(s).
suspend,server suspend,Suspend a server.
suspend,server suspend,Suspend a server.
trigger-crash-dump,server dump create,Trigger crash dump in an instance.
trigger-crash-dump,server dump create,Trigger crash dump in an instance.
topology,openstack server show --topology,Retrieve server NUMA topology.
unlock,server unlock,Unlock a server.
unlock,server unlock,Unlock a server.
unpause,server unpause,Unpause a server.
unpause,server unpause,Unpause a server.
unrescue,server unrescue,Restart the server from normal boot disk again.
unrescue,server unrescue,Restart the server from normal boot disk again.
unshelve,server unshelve,Unshelve a server.
unshelve,server unshelve,Unshelve a server.
update,server set / unset --description,Update or unset the description for a server.
update,server set / unset,Update the name or the description for a server.
update,server set --name,Update the name for a server.
usage,usage show,Show usage data for a single tenant.
usage,usage show,Show usage data for a single tenant.
usage-list,usage list,List usage data for all tenants.
usage-list,usage list,List usage data for all tenants.
version-list,,List all API versions.
version-list,versions show --service compute,List all API versions.
virtual-interface-list,,Show virtual interface info about the given server.
volume-attach,server add volume,Attach a volume to a server.
volume-attach,server add volume,Attach a volume to a server.
volume-attachments,server show,List all the volumes attached to a server.
volume-attachments,server volume list,List all the volumes attached to a server.
volume-detach,server remove volume,Detach a volume from a server.
volume-detach,server remove volume,Detach a volume from a server.
x509-create-cert,WONTFIX,Create x509 cert for a user in tenant.
bash-completion,complete,Prints all of the commands and options to stdout so that the nova.bash_completion script doesn't have to hard code them.
x509-get-root-cert,WONTFIX,Fetch the x509 root cert.
bash-completion,complete,Prints all of the commands and options to
help,help,Display help about this program or one of its subcommands.
help,help,Display help about this program or one of its subcommands.
1
add-fixed-ip
add-secgroup
server add fixed ip
server add security group
Add new IP address on a network to server.
Add a Security Group to a server.
add-fixed-ip
server add fixed ip
Add new IP address on a network to server.
1
add-secgroup
add-secgroup
server add security group
server add security group
Add a Security Group to a server.
Add a Security Group to a server.
2
agent-create
agent-create
compute agent create
compute agent create
Create new agent build.
Create new agent build.
3
agent-delete
agent-delete
compute agent delete
compute agent delete
Delete existing agent build.
Delete existing agent build.
4
agent-list
agent-list
compute agent list
compute agent list
List all builds.
List all builds.
5
agent-modify
agent-modify
compute agent set
compute agent set
Modify existing agent build.
Modify existing agent build.
6
aggregate-add-host
aggregate-add-host
aggregate add host
aggregate add host
Add the host to the specified aggregate.
Add the host to the specified aggregate.
7
aggregate-cache-images
aggregate cache image
Request images be cached. (Supported by API versions '2.81' - '2.latest') [hint: use '-- os-compute-api-version' flag to show help message for proper version]
8
aggregate-create
aggregate-create
aggregate create
aggregate create
Create a new aggregate with the specified details.
Create a new aggregate with the specified details.
9
aggregate-delete
aggregate-delete
aggregate delete
aggregate delete
Delete the aggregate.
Delete the aggregate.
10
aggregate-list
aggregate-list
aggregate list
aggregate list
Print a list of all aggregates.
Print a list of all aggregates.
15
availability-zone-list
availability-zone-list
availability zone list
availability zone list
List all the availability zones.
List all the availability zones.
16
backup
backup
server backup create
server backup create
Backup a server by creating a 'backup' type snapshot.
Backup a server by creating a 'backup' type snapshot.
17
boot
boot
server create
server create
Boot a new server.
Boot a new server.
18
cell-capacities
clear-password
server set --root-password
Get cell capacities for all cells or a given cell.
Clear the admin password for a server from the metadata server. This action does not actually change the instance server password.
cell-show
Show details of a given cell.
clear-password
server set --root-password
Clear the admin password for a server from the metadata server.
cloudpipe-configure
WONTFIX
Update the VPN IP/port of a cloudpipe instance.
cloudpipe-create
WONTFIX
Create a cloudpipe instance for the given project.
cloudpipe-list
WONTFIX
Print a list of all cloudpipe instances.
19
console-log
console-log
console log show
console log show
Get console log output of a server.
Get console log output of a server.
20
delete
delete
server delete
server delete
Immediately shut down and delete specified server(s).
Immediately shut down and delete specified server(s).
21
diagnostics
diagnostics
openstack server show --diagnostics
openstack server show --diagnostics
Retrieve server diagnostics.
Retrieve server diagnostics.
22
evacuate
evacuate
server evacuate
Evacuate server from failed host.
Evacuate server from failed host.
23
flavor-access-add
flavor-access-add
flavor set --project
Add flavor access for the given tenant.
Add flavor access for the given tenant.
24
flavor-access-list
flavor-access-list
flavor show
Print access information about the given flavor.
Print access information about the given flavor.
25
flavor-access-remove
flavor-access-remove
flavor unset
Remove flavor access for the given tenant.
Remove flavor access for the given tenant.
26
flavor-create
flavor-create
flavor create
flavor create
Create a new flavor.
Create a new flavor.
27
flavor-delete
flavor-delete
flavor delete
flavor delete
Delete a specific flavor
Delete a specific flavor
28
flavor-key
flavor-key
flavor set / unset
flavor set / unset --property
Set or unset extra_spec for a flavor.
Set or unset extra_spec for a flavor.
29
flavor-list
flavor-list
flavor list
flavor list
Print a list of available 'flavors'
Print a list of available 'flavors'
30
flavor-show
flavor-show
flavor show
flavor show
Show details about the given flavor.
Show details about the given flavor.
31
floating-ip-associate
flavor-update
server add floating ip
flavor set --description
Associate a floating IP address to a server.
Update the description of an existing flavor. (Supported by API versions '2.55' - '2.latest') [hint: use '--os-compute-api-version' flag to show help message for proper version]
floating-ip-disassociate
server remove floating ip
Disassociate a floating IP address from a server.
32
force-delete
force-delete
server delete
server delete
Force delete a server.
Force delete a server.
33
get-mks-console
get-mks-console
console url show --mks
console url show --mks
Get an MKS console to a server.
Get an MKS console to a server. (Supported by API versions '2.8' - '2.latest') [hint: use ' --os-compute-api-version' flag to show help message for proper version]
34
get-password
get-password
WONTFIX
WONTFIX
Get the admin password for a server.
Get the admin password for a server. This operation calls the metadata service to query metadata information and does not read password information from the server itself.
35
get-rdp-console
get-rdp-console
console url show --rdp
console url show --rdp
Get a rdp console to a server.
Get a rdp console to a server.
36
get-serial-console
get-serial-console
console url show --serial
console url show --serial
Get a serial console to a server.
Get a serial console to a server.
37
get-spice-console
get-spice-console
console url show --spice
console url show --spice
Get a spice console to a server.
Get a spice console to a server.
38
get-vnc-console
get-vnc-console
console url show --novnc | --xvpvnc
console url show --novnc
Get a vnc console to a server.
Get a vnc console to a server.
39
host-action
host-evacuate
WONTFIX
Perform a power action on a host.
Evacuate all instances from failed host.
40
host-describe
host-evacuate-live
host show
WONTFIX
Describe a specific host.
Live migrate all instances off the specified host to other available hosts.
41
host-evacuate
host-meta
WONTFIX
Evacuate all instances from failed host.
Set or Delete metadata on all instances of a host.
42
host-evacuate-live
host-servers-migrate
WONTFIX
Live migrate all instances off the specified host to other available hosts.
Cold migrate all instances off the specified host to other available hosts.
43
host-list
hypervisor-list
host list
hypervisor list
List all hosts by service.
List hypervisors. (Supported by API versions '2.0' - '2.latest')
44
host-meta
hypervisor-servers
server list --host
Set or Delete metadata on all instances of a host.
List servers belonging to specific hypervisors.
host-servers-migrate
Cold migrate all instances off the specified host to other available hosts.
host-update
host set
Update host settings.
hypervisor-list
hypervisor list
List hypervisors.
hypervisor-servers
List servers belonging to specific hypervisors.
45
hypervisor-show
hypervisor-show
hypervisor show
hypervisor show
Display the details of the specified hypervisor.
Display the details of the specified hypervisor.
46
hypervisor-stats
hypervisor-stats
hypervisor stats show
hypervisor stats show
Get hypervisor statistics over all compute nodes.
Get hypervisor statistics over all compute nodes.
47
hypervisor-uptime
hypervisor-uptime
hypervisor show
Display the uptime of the specified hypervisor.
Display the uptime of the specified hypervisor.
48
image-create
image-create
server image create
server image create
Create a new image by taking a snapshot of a running server.
Create a new image by taking a snapshot of a running server.
49
instance-action
instance-action
server event show
Show an action.
Show an action.
50
instance-action-list
instance-action-list
server event list
List actions on a server.
List actions on a server.
51
interface-attach
instance-usage-audit-log
WONTFIX
Attach a network interface to a server.
List/Get server usage audits.
52
interface-detach
interface-attach
server add port / server add floating ip / server add fixed ip
Detach a network interface from a server.
Attach a network interface to a server.
53
interface-detach
server remove port
Detach a network interface from a server.
54
interface-list
interface-list
port list --server
port list --server
List interfaces attached to a server.
List interfaces attached to a server.
55
keypair-add
keypair-add
keypair create
keypair create
Create a new key pair for use with servers.
Create a new key pair for use with servers.
56
keypair-delete
keypair-delete
keypair delete
keypair delete
Delete keypair given by its name.
Delete keypair given by its name.
58
keypair-show
keypair-show
keypair show
keypair show
Show details about the given keypair.
Show details about the given keypair.
59
limits
limits
limits show
limits show
Print rate and absolute limits.
Print rate and absolute limits.
60
list
list
server list
server list
List active servers.
List active servers.
list-extensions
extension list
List all the os-api extensions that are available.
61
list-secgroup
list-secgroup
security group list
security group list
List Security Group(s) of a server.
List Security Group(s) of a server.
62
live-migration
live-migration
server migration list
Migrate running server to a new machine.
Migrate running server to a new machine.
63
live-migration-abort
live-migration-abort
server migration abort
Abort an on-going live migration.
Abort an on-going live migration.
64
live-migration-force-comp
live-migration-force-comp
server migration force complete
Force on-going live migration to complete.
Force on-going live migration to complete.
65
lock
lock
server lock
server lock
Lock a server.
Lock a server.
66
meta
meta
server set --property / unset
server set --property / unset
Set or delete metadata on a server.
Set or delete metadata on a server.
67
migrate
migrate
server migrate
server migrate
Migrate a server. The new host will be selected by the scheduler.
Migrate a server. The new host will be selected by the scheduler.
68
migration-list
migration-list
server migration list
Print a list of migrations.
Print a list of migrations.
69
pause
pause
server pause
server pause
Pause a server.
Pause a server.
70
quota-class-show
quota-class-show
quota show --class
List the quotas for a quota class.
List the quotas for a quota class.
71
quota-class-update
quota-class-update
quota set --class
quota set --class
Update the quotas for a quota class.
Update the quotas for a quota class.
72
quota-defaults
quota-defaults
quota list
quota list
List the default quotas for a tenant.
List the default quotas for a tenant.
73
quota-delete
quota-delete
quota set
quota delete --compute
Delete quota for a tenant/user so their quota will Revert back to default.
Delete quota for a tenant/user so their quota will Revert back to default.
74
quota-show
quota-show
quota show
quota show
List the quotas for a tenant/user.
List the quotas for a tenant/user.
75
quota-update
quota-update
quota set
quota set
Update the quotas for a tenant/user.
Update the quotas for a tenant/user.
76
reboot
reboot
server reboot
server reboot
Reboot a server.
Reboot a server.
77
rebuild
rebuild
server rebuild
server rebuild
Shutdown, re-image, and re-boot a server.
Shutdown, re-image, and re-boot a server.
78
refresh-network
refresh-network
WONTFIX
WONTFIX
Refresh server network information.
Refresh server network information.
remove-fixed-ip
server remove fixed ip
Remove an IP address from a server.
79
remove-secgroup
remove-secgroup
server remove security group
server remove security group
Remove a Security Group from a server.
Remove a Security Group from a server.
80
rescue
rescue
server rescue
server rescue
Reboots a server into rescue mode.
Reboots a server into rescue mode.
81
reset-network
reset-network
WONTFIX
WONTFIX
Reset network of a server.
Reset network of a server.
89
server-group-delete
server-group-delete
server group delete
server group delete
Delete specific server group(s).
Delete specific server group(s).
90
server-group-get
server-group-get
server group show
server group show
Get a specific server group.
Get a specific server group.
91
server-group-list
server-group-list
server group list
server group list
Print a list of all server groups.
Print a list of all server groups.
92
server-migration-list
server-migration-list
server migration list
Get the migrations list of specified server.
Get the migrations list of specified server.
93
server-migration-show
server-migration-show
server migration show
Get the migration of specified server.
Get the migration of specified server.
94
server-tag-add
server-tag-add
server set --tag
Add one or more tags to a server.
Add one or more tags to a server.
95
server-tag-delete
server-tag-delete
server unset --tag
Delete one or more tags from a server.
Delete one or more tags from a server.
96
server-tag-delete-all
server-tag-delete-all
server unset --tag
Delete all tags from a server.
Delete all tags from a server.
97
server-tag-list
server-tag-list
server list --tag
Get list of tags from a server.
Get list of tags from a server.
98
server-tag-set
server-tag-set
server set --tag
Set list of tags to a server.
Set list of tags to a server.
99
server-topology
openstack server show --topology
Retrieve server topology. (Supported by API versions '2.78' - '2.latest') [hint: use '-- os-compute-api-version' flag to show help message for proper version]
100
service-delete
service-delete
compute service delete
compute service delete
Delete the service.
Delete the service.
101
service-disable
service-disable
compute service set --disable
compute service set --disable
Disable the service.
Disable the service.
102
service-enable
service-enable
compute service set --enable
compute service set --enable
Enable the service.
Enable the service.
111
stop
stop
server stop
server stop
Stop the server(s).
Stop the server(s).
112
suspend
suspend
server suspend
server suspend
Suspend a server.
Suspend a server.
113
trigger-crash-dump
trigger-crash-dump
server dump create
server dump create
Trigger crash dump in an instance.
Trigger crash dump in an instance.
topology
openstack server show --topology
Retrieve server NUMA topology.
114
unlock
unlock
server unlock
server unlock
Unlock a server.
Unlock a server.
115
unpause
unpause
server unpause
server unpause
Unpause a server.
Unpause a server.
116
unrescue
unrescue
server unrescue
server unrescue
Restart the server from normal boot disk again.
Restart the server from normal boot disk again.
117
unshelve
unshelve
server unshelve
server unshelve
Unshelve a server.
Unshelve a server.
118
update
update
server set / unset --description
server set / unset
Update or unset the description for a server.
Update the name or the description for a server.
update
server set --name
Update the name for a server.
119
usage
usage
usage show
usage show
Show usage data for a single tenant.
Show usage data for a single tenant.
120
usage-list
usage-list
usage list
usage list
List usage data for all tenants.
List usage data for all tenants.
121
version-list
version-list
versions show --service compute
List all API versions.
List all API versions.
virtual-interface-list
Show virtual interface info about the given server.
122
volume-attach
volume-attach
server add volume
server add volume
Attach a volume to a server.
Attach a volume to a server.
123
volume-attachments
volume-attachments
server show
server volume list
List all the volumes attached to a server.
List all the volumes attached to a server.
124
volume-detach
volume-detach
server remove volume
server remove volume
Detach a volume from a server.
Detach a volume from a server.
125
volume-update
volume-update
server volume update
Update volume attachment.
Update volume attachment.
126
x509-create-cert
bash-completion
WONTFIX
complete
Create x509 cert for a user in tenant.
Prints all of the commands and options to stdout so that the nova.bash_completion script doesn't have to hard code them.
x509-get-root-cert
WONTFIX
Fetch the x509 root cert.
bash-completion
complete
Prints all of the commands and options to
127
help
help
help
help
Display help about this program or one of its subcommands.
Display help about this program or one of its subcommands.
@ -49,7 +49,7 @@ command line. The primary difference is the use of 'project' in the name of the
Refer to the keystoneclient library documentation for more details about these plugins and their options, and for a complete list of available plugins.
Refer to the keystoneclient library documentation for more details about these plugins and their options, and for a complete list of available plugins.
Please bear in mind that some plugins might not support all of the functionalities of :program:`openstack`; for example the v3unscopedsaml plugin can deliver only unscoped tokens, some commands might not be available through this authentication method.
Please bear in mind that some plugins might not support all of the functionalities of :program:`openstack`; for example the v3unscopedsaml plugin can deliver only unscoped tokens, some commands might not be available through this authentication method.
Additionally, it is possible to use Keystone's service token to authenticate, by setting the options :option:`--os-token` and :option:`--os-url` (or the environment variables :envvar:`OS_TOKEN` and :envvar:`OS_URL` respectively). This method takes precedence over authentication plugins.
Additionally, it is possible to use Keystone's service token to authenticate, by setting the options :option:`--os-token` and :option:`--os-endpoint` (or the environment variables :envvar:`OS_TOKEN` and :envvar:`OS_ENDPOINT` respectively). This method takes precedence over authentication plugins.
..NOTE::
..NOTE::
To use the ``v3unscopedsaml`` method, the lxml package will need to be installed.
To use the ``v3unscopedsaml`` method, the lxml package will need to be installed.
@ -106,9 +106,9 @@ OPTIONS
Authentication URL
Authentication URL
..option:: --os-url <service-url>
..option:: --os-endpoint <service-url>
Service URL, when using a service token for authentication
Service ENDPOINT, when using a service token for authentication
..option:: --os-domain-name <auth-domain-name>
..option:: --os-domain-name <auth-domain-name>
@ -349,7 +349,7 @@ file, but if those are incomplete it may be impossible to know which
auth type is intended. The :option:`--os-auth-type` option can always be
auth type is intended. The :option:`--os-auth-type` option can always be
used to force a specific type.
used to force a specific type.
When :option:`--os-token` and :option:`--os-url` are both present the
When :option:`--os-token` and :option:`--os-endpoint` are both present the
``token_endpoint`` auth type is selected automatically. If
``token_endpoint`` auth type is selected automatically. If
:option:`--os-auth-url` and :option:`--os-username` are present ``password``
:option:`--os-auth-url` and :option:`--os-username` are present ``password``
auth type is selected.
auth type is selected.
@ -466,9 +466,9 @@ The following environment variables can be set to alter the behaviour of :progra
- ``v3applicationcredential``
- ``v3applicationcredential``
- ``v3multifactor``
- ``v3multifactor``
..envvar:: OS_URL
..envvar:: OS_ENDPOINT
Service URL (when using the service token)
Service ENDPOINT (when using the service token)
..envvar:: OS_DOMAIN_NAME
..envvar:: OS_DOMAIN_NAME
@ -593,8 +593,8 @@ The following environment variables can be set to alter the behaviour of :progra
BUGS
BUGS
====
====
Bug reports are accepted at the python-openstackclient StoryBoard project
Bug reports are accepted at the python-openstackclient Launchpad project
@ -117,14 +117,14 @@ interface to the user, not the user to the interface.
Commands should be discoverable via the interface itself.
Commands should be discoverable via the interface itself.
To determine a list of available commands, use the :code:`-h` or
To determine a list of available commands, use the ``-h`` or
:code:`--help` options:
``--help`` options:
..code-block:: bash
..code-block:: bash
$ openstack --help
$ openstack --help
For help with an individual command, use the :code:`help` command:
For help with an individual command, use the ``help`` command:
..code-block:: bash
..code-block:: bash
@ -167,7 +167,7 @@ Command Structure
OpenStackClient has a consistent and predictable format for all of its commands.
OpenStackClient has a consistent and predictable format for all of its commands.
* The top level command name is :code:`openstack`
* The top level command name is ``openstack``
* Sub-commands take the form:
* Sub-commands take the form:
..code-block:: bash
..code-block:: bash
@ -185,6 +185,21 @@ Output formats:
* user-friendly tables with headers, etc
* user-friendly tables with headers, etc
* machine-parsable delimited
* machine-parsable delimited
..note::
A note on terminology. An **argument** is a positional parameter to the
command. As discussed later, these should be used sparingly in
OpenStackClient. An **option** - also known as a **flag** - is a named
parameter denoted with either a hyphen and a single-letter name (``-r``) or
a double hyphen and a multiple-letter name (``--recursive``). They may or
may not also include a user-specified value (``--file foo.txt`` or
``--file=foo.txt``).
For more information on this topic and CLIs in general, refer to the
excellent `Command Line Interface Guidelines website`__.
..__: https://clig.dev/#arguments-and-flags
Global Options
Global Options
~~~~~~~~~~~~~~
~~~~~~~~~~~~~~
@ -193,84 +208,151 @@ invocation regardless of action to be performed. They include authentication
credentials and API version selection. Most global options have a corresponding
credentials and API version selection. Most global options have a corresponding
environment variable that may also be used to set the value. If both are present,
environment variable that may also be used to set the value. If both are present,
the command-line option takes priority. The environment variable names are derived
the command-line option takes priority. The environment variable names are derived
from the option name by dropping the leading dashes ('--'), converting each embedded
from the option name by dropping the leading dashes (``--``), converting each embedded
dash ('-') to an underscore ('_'), and converting to upper case.
dash (``-``) to an underscore (``_``), and converting to upper case.
* Global options shall always have a long option name, certain common options may
* Global options shall always have a long option name, certain common options may
also have short names. Short names should be reserved for global options to limit
also have short names. Short names should be reserved for global options to limit
the potential for duplication and multiple meanings between commands given the
the potential for duplication and multiple meanings between commands given the
limited set of available short names.
limited set of available short names.
* All long options names shall begin with two dashes ('--') and use a single dash
('-') internally between words (:code:`--like-this`). Underscores ('_') shall not
* All long options names shall begin with two dashes (``--``) and use a single dash
(``-``) internally between words (``--like-this``). Underscores (``_``) shall not
be used in option names.
be used in option names.
* Authentication options conform to the common CLI authentication guidelines in
* Authentication options conform to the common CLI authentication guidelines in
:ref:`authentication`.
:ref:`authentication`.
For example, :code:`--os-username` can be set from the environment via
For example, ``--os-username`` can be set from the environment via
:code:`OS_USERNAME`.
``OS_USERNAME``.
--help
``--help``
++++++
++++++++++
The standard :code:`--help` global option displays the documentation for invoking
The standard ``--help`` global option displays the documentation for invoking
the program and a list of the available commands on standard output. All other
the program and a list of the available commands on standard output. All other
options and commands are ignored when this is present. The traditional short
options and commands are ignored when this is present. The traditional short
form help option (:code:`-h`) is also available.
form help option (``-h``) is also available.
--version
``--version``
+++++++++
+++++++++++++
The standard :code:`--version` option displays the name and version on standard
The standard ``--version`` option displays the name and version on standard
output. All other options and commands are ignored when this is present.
output. All other options and commands are ignored when this is present.
Command Object(s) and Action
Objects and Actions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
Commands consist of an object described by one or more words followed by an action. Commands that require two objects have the primary object ahead of the action and the secondary object after the action. Any positional arguments identifying the objects shall appear in the same order as the objects. In badly formed English it is expressed as "(Take) object1 (and perform) action (using) object2 (to it)."
Commands consist of an object, described by one or more words, followed by an
action. ::
<object-1> <action> [<object-2>]
<object> <action>
Examples:
For example:
* :code:`group add user <group> <user>`
* ``group create``
* :code:`volume type list` # Note that :code:`volume type` is a two-word
* ``server set``
single object
* ``volume type list``
The :code:`help` command is unique as it appears in front of a normal command
(note that ``volume type`` is a two-word single object)
and displays the help text for that command rather than execute it.
Some commands require two objects. These commands have the primary object ahead of the
action and the secondary object after the action. In badly formed English it is