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
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>
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