5614 Commits

Author SHA1 Message Date
Zuul
7dc1276f40 Merge "Adding `image delete --store and image import info` commands" 2023-08-09 19:01:35 +00:00
Zuul
afdec1d2ca Merge "Add image metadef resource type command 'list'" 2023-08-09 19:01:33 +00:00
Mridula Joshi
b347347986 Adding `image delete --store and image import info` commands
Change-Id: Ia5fc44c6738f8ee3a0781d824c7f7fa458185e0c
2023-08-07 17:13:33 +00:00
Zuul
9846092b33 Merge "Neutron port hints" 2023-08-07 13:27:49 +00:00
Zuul
7ea78b6ef6 Merge "Migrate 'volume summary' command to SDK" 2023-07-24 12:29:14 +00:00
Tony Breeds
deab1a7ad8 Update the underlying python containers to "3.10-bookworm"
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
2023-07-18 20:24:53 +10:00
Antonia Gaete
52bf194741 Add image metadef resource type command 'list'
This patch will add ``image metadef resource type list`` using
SDK, output matches glance client output.

Change-Id: I29850abdbb06d5a4eaf8a9a60f565b46f4009f85
2023-07-06 17:27:21 +01:00
Zuul
46431ed203 Merge "Allow multiple --remove-tag in project set" 2023-07-05 11:07:48 +00:00
whoami-rajat
4dfbc5011e Migrate 'volume summary' command to SDK
This patch modifies the existing volume summary call from
cinderclient to SDK.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/884397
Change-Id: I364211a597b6ec155b154fa9d3c67239e750b5ad
2023-07-05 10:04:01 +00:00
Stephen Finucane
717837153b tests: Use a new project for quota tests
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>
2023-06-09 14:35:58 +01:00
Jake Yip
b4ba04698b Allow multiple --remove-tag in project set
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
2023-06-08 18:22:48 +10:00
Zuul
a0971501a9 Merge "tox: Disable E501" 2023-06-06 17:24:00 +00:00
Douglas Mendizábal
bc60e3bb90 Fix "access rule" commands to only use ID
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
2023-06-05 12:03:15 -04:00
Stephen Finucane
3ba55118eb tox: Disable E501
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>
2023-05-31 17:39:59 +01:00
Bence Romsics
22d1a26d1d Neutron port hints
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
2023-05-24 13:08:15 +02:00
Zuul
f3a51b0051 Merge "trivial: Remove duplicate definitions" 2023-05-18 12:33:01 +00:00
Zuul
90fe18e51b Merge "Dropping the use of 'addFixedIp' server action" 2023-05-18 11:52:56 +00:00
Stephen Finucane
e984ca18a4 trivial: Remove duplicate definitions
These are already set in the 'TestServer' super class.

Change-Id: I90cfd9ff004c59cadc3e760eb120a460687701fe
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-18 10:14:12 +00:00
Zuul
4a62c73992 Merge "volume: Add 'volume qos set --no-property' option" 2023-05-17 23:20:28 +00:00
Zuul
d0a17d48a9 Merge "compute: Fix bug with start/stop server" 2023-05-17 23:20:17 +00:00
Zuul
a2728356af Merge "Allow server rebuild --wait for SHUTOFF servers" 2023-05-17 23:20:11 +00:00
Zuul
938850bae1 Merge "Migrate 'volume revert' command to SDK" 2023-05-17 17:09:20 +00:00
Stephen Finucane
e91844dd0e Dropping the use of 'addFixedIp' server action
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
2023-05-17 17:47:05 +01:00
Stephen Finucane
629eb33c4d volume: Add 'volume qos set --no-property' option
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
2023-05-17 16:50:16 +01:00
Stephen Finucane
0a63f8603e compute: Fix bug with start/stop server
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
2023-05-17 15:59:33 +01:00
Pavlo Shchelokovskyy
417a7ad203 Allow server rebuild --wait for SHUTOFF servers
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
2023-05-17 11:38:37 +00:00
Stephen Finucane
31ae635ffe tests: Use SDK objects where expected
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>
2023-05-16 16:55:08 +00:00
Stephen Finucane
19be070204 tests: Remove unnecessary nesting of compute resources
Change-Id: I27326b8f2e0d84d3ef2c2fbdcb5c96a5ac1d79e4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-16 16:21:44 +01:00
Stephen Finucane
347b444feb tests: Reorder compute fakes
This will make future changes slightly less complex.

Change-Id: Ia69fd9d05796cce5ed48a8d12902cb54caec9779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-16 16:21:02 +01:00
whoami-rajat
aaeda25e28 Migrate 'volume revert' command to SDK
This patch modifies the existing revert volume to snapshot call
from cinderclient to SDK.

Change-Id: Iaa9708ebae5d6ab3dfc73e4e2376af32ed098688
2023-05-16 17:38:10 +05:30
Stephen Finucane
3c9afe69bb pre-commit: Enable black
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
229791cdb4 Ignore black changes
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
d3f4a3d7f5 Blacken everything else
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
a6f81a736c Blacken openstackclient.api
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
7d80f9e962 Blacken openstack.common
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
7ca43885c2 Blacken openstackclient.image
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
329296cedd Blacken openstackclient.object
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
aed521d426 Blacken openstackclient.identity
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
6475dc58e8 Blacken openstackclient.network
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
35ba1d8f13 Blacken openstackclient.volume
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
28ffa2bf9f Blacken openstackclient.compute
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>
2023-05-10 10:51:30 +01:00
Stephen Finucane
5cb16aebcc Use pre-commit for 'pep8' tox target, bump versions
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>
2023-05-10 10:51:00 +01:00
Stephen Finucane
379db31ea2 Address pre-commit issues
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>
2023-05-10 10:48:53 +01:00
Zuul
43f0e1090a Merge "compute: Generate SSH keypairs ourselves" 2023-05-04 15:06:03 +00:00
Zuul
83016780c7 Merge "Silence warnings from openstacksdk" 2023-05-03 16:51:35 +00:00
Stephen Finucane
2454636386 compute: Generate SSH keypairs ourselves
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
2023-05-02 12:18:52 +01:00
Zuul
a2f877f70c Merge "Migrate 'server event *' commands to SDK" 2023-04-21 17:30:11 +00:00
Huda Irshad
737540cca0 Migrate 'server event *' commands to SDK
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>
2023-04-20 12:09:59 +01:00
Artem Goncharov
a675c61e46 Fix pep issue in the network service provider
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
2023-04-20 11:15:37 +02:00
Mridula Joshi
16c78fef15 Adding `image import` command
Change-Id: I7254d30431894879c8bd20e2263d83b12c99d5c8
2023-04-12 09:42:43 +00:00