5409 Commits

Author SHA1 Message Date
melanie witt
93578ef85b Add 'Host Status' to 'server list --long' with >= v2.16
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
2022-05-16 17:55:40 +00:00
Zuul
9fc9e8d9d7 Merge "Allow to filter multiple tags for image list" 2022-05-16 16:36:48 +00:00
Stephen Finucane
045f2e7e06 volume: Correct output of 'volume attachment create'
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>
2022-05-16 12:47:39 +01:00
Zuul
ccd877dd40 Merge "Fix typos" 2022-05-16 09:36:14 +00:00
Dmitriy Rabotyagov
5cc6fc2b88 Allow to filter multiple tags for image list
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
2022-05-16 09:16:52 +01:00
likui
c677192d51 Stop testing lower-constraints
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-October/018445.html

Change-Id: I45e9a81d451c64cdd51f9b606d94161742bacdb7
2022-05-14 11:02:12 +08:00
Zuul
4b97a85181 Merge "Refactor network fakes to sdk properties PART 4" 2022-05-13 16:30:47 +00:00
Zuul
9b399c5528 Merge "Stop using private _is_uuid_like method" 2022-05-13 16:30:44 +00:00
Zuul
644106a89c Merge "volume: Add 'block storage resource filter list' command" 2022-05-13 15:24:26 +00:00
Zuul
7fcfce486b Merge "volume: Add 'block storage cluster *' commands" 2022-05-13 14:13:07 +00:00
Zuul
4b14c400ff Merge "tests: Improve logging for executed commands" 2022-05-13 11:57:56 +00:00
Stephen Finucane
53a7e67b41 volume: Add 'block storage resource filter list' command
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>
2022-05-13 12:42:16 +01:00
Stephen Finucane
d727a65023 volume: Add 'block storage cluster *' commands
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>
2022-05-13 11:59:23 +01:00
Nurmatov Mamatisa
ccd84f8f2b Refactor network fakes to sdk properties PART 4
Included resources:
port
network_agent
network_flavor_profile
network_rbac

Change-Id: I2e71a3c0fefb56ddcc75865c95746550e2710aa3
2022-04-29 16:40:23 +03:00
Pavlo Shchelokovskyy
afc5f997c8 Stop using private _is_uuid_like method
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
2022-04-20 17:42:02 +03:00
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
Stephen Finucane
725b7de13c compute: Only retrieve necessary images
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
2022-04-12 20:41:29 +01:00
Nicolas Belouin
64e4520b2a Add trustor and trustee filtering to trusts list
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
2022-04-12 06:26:18 +00:00
Zuul
dabaec5a7b Merge "volume: fix backup list of deleted volume" 2022-04-11 09:43:13 +00:00
Zuul
8f07476e53 Merge "volume list: don't fail when there's no compute service" 2022-03-24 21:29:04 +00:00
Zuul
fe165ef76f Merge "Refactor network fakes to sdk properties PART 3" 2022-03-24 11:31:02 +00:00
Zuul
7602451ab5 Merge "Refactor network fakes to sdk properties PART 2" 2022-03-23 17:00:17 +00:00
Zuul
65dad11108 Merge "Refactor network fakes to sdk properties PART 1" 2022-03-23 16:55:25 +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
Nurmatov Mamatisa
8efe863129 Refactor network fakes to sdk properties PART 3
Included resources:
network_flavor
network_segment
network_segment_range

Change-Id: If5ce0a07052d9dc0edb4f5f22806635b5bb6a523
2022-03-16 12:30:21 +03:00
Thobias Salazar Trevisan
e91e0e001c compute: Add 'Security Groups' for 'server list'
Add a column with security groups name for
--long option on server list.

Change-Id: I7062f224e18c3c8ac96a06d7ce97f9fab473bdb9
2022-03-15 08:56:59 -03:00
Nurmatov Mamatisa
6fe0ae497c Refactor network fakes to sdk properties PART 2
Included resources:
ip_availibility
network

Change-Id: I141bcb43272594da75e776a84a74158fc866ac94
2022-03-15 11:48:33 +03:00
Nurmatov Mamatisa
23ad68264b Refactor network fakes to sdk properties PART 1
Included resources:
address_group
address_scope
auto_allocated_topology
availability_zone

Change-Id: I943f988588efbe68dd3ab17a18441b25ac8c8d4d
2022-03-15 11:28:44 +03:00
Huanxuan Ao
de4a69a29f Refactor "volume backup restore" command
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
2022-03-10 12:04:11 +00:00
Stephen Finucane
c9b84106c3 compute: Move server migrations commands to their own file
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>
2022-03-09 17:32:30 +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
Zuul
8c975ba097 Merge "Fix 'server event list|show' for deleted servers" 2022-03-09 13:44:47 +00:00
Zuul
be1de891ac Merge "compute: Use correct command class for 'show migration'" 2022-03-09 13:44:29 +00:00
Zuul
91a963873f Merge "Fix metavars and typos in local_ip" 2022-03-09 13:44:26 +00:00
Jan Hartkopf
8acead32ee volume: fix backup list of deleted volume
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>
2022-03-08 16:28:43 +01:00
54b32a37d7 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Id79fecd4c4b16f2e5c3a5713be50327757346c1a
2022-03-08 12:49:48 +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
Nurmatov Mamatisa
3e61824d4a Fix metavars and typos in local_ip
Change-Id: I2094f343e3353da25f9c5057ea5444345e271665
2022-03-02 12:52:14 +00:00
Zuul
63452f362d Merge "Add support for setting extra DHCP options on existing ports" 2022-02-25 13:26:11 +00:00
Zuul
bf71727c55 Merge "Add support for 'remote-managed' vnic type" 2022-02-23 07:55:28 +00:00
Slawek Kaplonski
47fa9ba356 Add support for setting extra DHCP options on existing ports
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
2022-02-21 22:52:38 +01:00
Dr. Jens Harbott
077c9a77a2 volume list: don't fail when there's no compute service
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
2022-02-17 16:08:57 +01:00
melanie witt
72a2477ec0 Fix 'server event list|show' for deleted servers
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
2022-02-09 23:26:25 +00:00
Zuul
d876b41958 Merge "image: Sanity check the 'SetImage' command" 2022-02-09 21:00:49 +00:00
Zuul
811add8b58 Merge "tests: Update fake image client in tests" 2022-02-09 21:00:46 +00:00
Zuul
20500c6ac9 Merge "image: Remove FakeImage test helper" 2022-02-09 20:42:43 +00:00
Zuul
f7eaaa8408 Merge "docs: Document additional 'server migration' commands" 2022-02-09 20:42:40 +00:00
Zuul
b072118afc Merge "compute: Don't warn if disk overcommit params unset" 2022-02-09 20:42:33 +00:00
Zuul
27843fc232 Merge "Add missing command mapping in nova" 2022-02-09 12:50:18 +00:00
Zuul
5f73c527ee Merge "Support Neutron Local IP CRUD" 2022-02-09 12:50:15 +00:00