1067 Commits

Author SHA1 Message Date
JIHOJU
10835a1886 Add more filter option of columns for server list -c COLUMN
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
2022-04-19 11:17:03 +00:00
Rodolfo Alonso Hernandez
1c6d396ba3 Allow "--force" flag in quota network commands
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
2022-03-17 02:38:07 +00:00
Stephen Finucane
cffec4517f compute: Allow retrieval of migration by UUID
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>
2022-03-09 17:31:44 +00:00
15a7838c30 Update master for stable/yoga
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
2022-03-08 12:49:45 +00:00
Zuul
bf71727c55 Merge "Add support for 'remote-managed' vnic type" 2022-02-23 07:55:28 +00:00
Zuul
5f73c527ee Merge "Support Neutron Local IP CRUD" 2022-02-09 12:50:15 +00:00
Frode Nordahl
d565f11093
Add support for 'remote-managed' vnic type
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
2022-02-08 07:26:46 +01:00
Zuul
e000fd5f0d Merge "Add network update quota "limit_check" parameter" 2022-02-03 15:53:02 +00:00
Dr. Jens Harbott
746b91335c Don't fail on extlinks warnings for reno build
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
2022-02-03 12:19:27 +01:00
Nurmatov Mamatisa
26144743d9 Support Neutron Local IP CRUD
Add support for Neutron Local IP CRUD operations.

Partial-Bug: #1930200
Depends-On: https://review.opendev.org/c/openstack/neutron/+/804523
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/804988
Change-Id: I1095100efb27b8559412469f0a9d07fc0a3db9d5
2022-01-28 17:24:04 +03:00
Ritvik Vinodkumar
b5a2714b83 Switch compute service list, delete and set to sdk.
Switch the compute service commands from novaclient to SDK.

Change-Id: I16498905101d6c2702a3ccbaf8cf5e3098d51992
2022-01-14 18:36:37 +00:00
Zuul
0a887a4786 Merge "Add --security-group to port list" 2022-01-13 20:13:30 +00:00
Zuul
9b49363c0d Merge "Switch add fixed IP to SDK" 2021-12-25 10:54:22 +00:00
Hugh Saunders
3a929611c0 compute: Pass through args to ssh
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>
2021-12-15 17:41:58 +00:00
Ritvik Vinodkumar
9971d7253e Switch add fixed IP to SDK
Switch the add fixed IP command from novaclient to SDK.

Change-Id: I4752ea7b4bfc17e04b8f46dbe9a68d938501a89e
2021-12-14 14:55:22 +00:00
Zuul
c10a4cd966 Merge "Allow unset port's host_id" 2021-12-13 10:26:18 +00:00
Dr. Jens Harbott
4e9b929842 Allow setting gateway when creating a router
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
2021-12-09 13:49:27 +00:00
Rodolfo Alonso Hernandez
bef70397a3 Add network update quota "limit_check" parameter
This new parameter commands the Neutron server to first check the
resource usage before setting the new quota limit. If the resource
usage is below the new limit, the Neutron server will raise an
exception.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/806254
Depends-On: https://review.opendev.org/c/openstack/neutron/+/801470

Partial-Bug: #1936408
Change-Id: Idc1b99492d609eb699d0a6bef6cd760458a774f6
2021-12-07 17:49:26 +00:00
Rodolfo Alonso Hernandez
c8c4f76498 Add --security-group to port list
The neutron API supports filtering ports by security group.

Closes-Bug: #1405057

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/804979
Change-Id: I0f626882716c21ac200c1b929ea04664d21874d8
2021-12-02 11:12:47 +00:00
Zuul
9eb42403d3 Merge "compute: Show flavor in 'server list' with API >= 2.47" 2021-11-30 19:45:10 +00:00
Zuul
d9ad0b5d46 Merge "Switch openstack server remove port/network to using sdk" 2021-11-30 19:08:01 +00:00
Zuul
e02fd2ab18 Merge "Switch server suspend and server resume to SDK" 2021-11-30 19:07:58 +00:00
Zuul
cf02135b52 Merge "Switch server pause and server unpause to SDK" 2021-11-30 19:07:55 +00:00
Khomesh Thakre
8e362402de compute: Show flavor in 'server list' with API >= 2.47
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
2021-11-30 16:52:37 +00:00
Thrivikram Mudunuri
ff96fea012
Switch server suspend and server resume to SDK
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
2021-11-29 11:50:04 -05:00
Thrivikram Mudunuri
b515fe61b2
Switch server pause and server unpause to SDK
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
2021-11-29 11:47:58 -05:00
Diwei Zhu
f82afc7f37 Switch openstack server remove port/network to using sdk
Change-Id: I1540c1f52e9a107dba20eeea9dc323c5510fe2b1
2021-11-29 14:31:07 +00:00
Zuul
397688320d Merge "Switch server image create to SDK" 2021-11-29 13:38:51 +00:00
Slawek Kaplonski
f462933113 Allow unset port's host_id
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
2021-11-28 19:58:46 +01:00
Diwei Zhu
fae293dd52 Switch command server remove volume to sdk
Change-Id: If6f6cf93b55a67e767c54de8ce21f25252cf99ca
2021-11-26 16:11:21 +00:00
Zuul
4b3cdaf8b1 Merge "Switch command server add volume to sdk." 2021-11-25 17:46:47 +00:00
Zuul
6fb71af243 Merge "Add --subnet-pool to subnet list" 2021-11-25 17:46:44 +00:00
Diwei Zhu
3078a0a121 Switch command server add volume to sdk.
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
2021-11-22 16:01:29 +00:00
Thrivikram Mudunuri
9acbd3e105
Switch server image create to SDK
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
2021-11-16 11:36:02 -05:00
Zuul
8b394e5641 Merge "Switch openstack server add port/network to using sdk." 2021-11-15 16:31:15 +00:00
Diwei Zhu
2183a61147 Switch openstack server add port/network to using sdk.
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
2021-11-14 15:23:36 +00:00
Stephen Finucane
163cb01e46 compute: Return details of attached volumes
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>
2021-11-03 11:57:31 +00:00
Diwei Zhu
57aad01886 Switch server backup to sdk.
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
2021-10-27 09:11:27 +00:00
Stephen Finucane
53debe7fe1 compute: Fix filtering servers by tags
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
2021-10-13 10:30:26 +01:00
Pavlo Shchelokovskyy
28a376bfb0 Add --trusted-image-cert option for server create
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
2021-09-30 19:42:26 +03:00
8ef9280af9 Update master for stable/xena
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
2021-09-22 10:42:16 +00:00
Zuul
3a0571c4df Merge "compute: Add support for microversion 2.90" 2021-09-02 20:15:11 +00:00
Lee Yarwood
51ee17a94d compute: Add support for microversion 2.89
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
2021-09-02 14:35:17 +01:00
Stephen Finucane
8e833a3ed2 compute: Add support for microversion 2.90
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
2021-09-01 13:18:25 +01:00
Zuul
eca51342c3 Merge "volume: Add 'volume transfer request create --(no-)snapshots' option" 2021-08-26 08:03:53 +00:00
melanie witt
12c93c6d5f Show "Forced Down" compute service status with --long
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
2021-08-17 01:34:05 +00:00
Stephen Finucane
a821d6b7c5 volume: Add 'volume transfer request create --(no-)snapshots' option
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
2021-07-13 20:33:35 +01:00
Stephen Finucane
af406f33e3 cinder: Remove redundant command
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>
2021-06-22 18:26:54 +01:00
Zuul
a5039e7764 Merge "volume: Add more missing 'volume backup *' options" 2021-06-21 13:20:28 +00:00
Zuul
3f3d8829ce Merge "volume: Add 'volume group snapshot *' commands" 2021-06-21 13:09:41 +00:00