5329 Commits

Author SHA1 Message Date
Violet Kurtz
a9f8133274 Migrate server_groups to the new API
Moved the server_groups to the new API.

Change-Id: Ied7bd6f56e277f0c5efcd5ba028765f9be65050f
2022-08-02 20:39:19 +00:00
Zuul
60dd6e6257 Merge "Drop support for Python 3.6, 3.7" 2022-07-27 11:45:06 +00:00
Zuul
b3ae3f5552 Merge "Add support for CRUD operations for QoS minimum packet rate rule" 2022-07-20 14:13:42 +00:00
likui
4e769f0ed0 Drop support for Python 3.6, 3.7
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>
2022-07-04 17:48:55 +01:00
Stephen Finucane
e49ad1795b pre-commit: Allow unsafe YAML
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>
2022-07-04 12:16:16 +01:00
Zuul
366e164738 Merge "Stop testing lower-constraints" 2022-07-01 18:01:08 +00:00
Przemyslaw Szczerbik
6ccbcdde64 Add support for CRUD operations for QoS minimum packet rate rule
Closes-Bug: #1922237
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/810364
See-Also: https://review.opendev.org/785236
Change-Id: Ie7e1eb0575fd37121d5097ecbc318d0769ab3db0
2022-07-01 13:55:41 +00:00
Stephen Finucane
14b93fec76 image: Split image creation depending on service
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>
2022-06-30 11:54:45 +01:00
Stephen Finucane
4776e0a5ae image: Make better use of argparse
Simplify some logic by using a common 'dest' for mutually exclusive
options.

Change-Id: Ie5f3600672953f40be52de51e84717c8912ddaf8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-06-30 11:51:33 +01:00
whoami-rajat
9eea28ba59 Fix: create image from volume command
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
2022-06-30 11:15:33 +01:00
Stephen Finucane
2290b38ab3 image: Trivial style changes
Change-Id: I35b7b8a80609916eb47357af4398789788d66382
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-06-30 11:15:33 +01:00
Zuul
20e7b01af8 Merge "Skip test_quota_network_set_with_force func test" 2022-06-28 09:51:10 +00:00
Dr. Jens Harbott
c6e8648786 Skip test_quota_network_set_with_force func test
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
2022-06-28 06:56:14 +02:00
Zuul
30622272e3 Merge "volume: Correct output of 'volume attachment create'" 2022-06-27 15:54:20 +00:00
Dr. Jens Harbott
604ceeedf9 Don't show tenant_id in network objects
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
2022-06-27 10:50:03 +02:00
Zuul
4f79def9aa Merge "Allow users to list all images" 2022-06-20 15:19:59 +00:00
Zuul
ec95b58482 Merge "Refactor "volume backup restore" command" 2022-06-20 15:19:56 +00:00
Zuul
15608a2696 Merge "Add more filter option of columns for server list -c COLUMN" 2022-06-20 15:19:49 +00:00
Cyril Roelandt
34d1e0c7eb Allow users to list all images
Add a "--all" option to "openstack image list", which allows the user to
list all of the images.

Story: 2010071
Change-Id: I56a2e4846d0380d07803305fb830d1a43dfd71b3
2022-06-07 20:22:34 +02:00
Zuul
ed304992eb Merge "Changed minversion in tox to 3.18.0" 2022-06-01 15:54:37 +00:00
Zuul
6810414e45 Merge "Migrate osc-tox-py3N-tips to Python 3.8" 2022-05-25 06:12:21 +00:00
Takashi Kajinami
8a03f3cabc Migrate osc-tox-py3N-tips to Python 3.8
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
2022-05-24 09:02:16 +00:00
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
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