In [1], the "port list --long" command received a new column, showing
the trunk subports related to a parent port. The problem of this patch
is that the ``_formatters`` definition, that is shared with the "port
show" command too, is changed. The "trunk_details" information presented
in both commands differ:
* In the "port list" command, only the subports are presented, in order
to print a list of dictionaries without showing the ``trunk_id``.
* In the "port show" command, it is presented all the trunk information,
including the ``trunk_id``.
This patch includes functional tests to validate the fix.
[1]https://review.opendev.org/c/openstack/python-openstackclient/+/926611
Closes-Bug: #2098950
Change-Id: Ib1107fb3dbb025b39a7c55f90f5fe51ae433a72f
Neutron API is accepting 'security_groups' field in
order to return the list of security_groups attached
to a port, but openstackclient is parsing the output
over a Openstack Port object that has security_group_ids
to map. This patch sends to the Neutron API the expected
field value and replace the output key to allow the
mapping just in case '--long' argument is passed.
Closes-Bug: #2095414
Change-Id: I188edc3c620ce29d7b16497ca24fd7d972a06618
The datetime.utcnow() is deprecated in Python 3.12.
Replace datetime.utcnow() with
datetime.now(datetime.timezone.utc).replace(tzinfo=None).
Change-Id: Ic20174a9c6cacac05471fa57b105c1f784a73057
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
We changed these in change I37d07a6c5cdc98680b8d65d596521cad2b049500 but
the '-c/--column' option provided by cliff currently requires an
explicit match on column names. Change them back for now. We can revert
this when cliff is a little bit smarter.
Change-Id: I9180922e9da5c22ae3d8878946d1bf1ec4b8c6e1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2076212
We changed these in change Iba3fee2672d32266623c6f367beaabe84bd3d24e but
the '-c/--column' option provided by cliff currently requires an
explicit match on column names. Change them back for now. We can revert
this when cliff is a little bit cleverer.
Change-Id: I6b4f1b793dc383856bfdf9a01514381be3cd2bf1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-bug: #2076212
There are a few remnants left here but this is trivial to clean up now.
Change-Id: I517d906796338e64a31afa08b9ee6909b08e0115
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also ensure we call neutron rather than the deprecated nova proxy API
in the event that neutron is available.
Change-Id: I8315ea164fd3fa6c1d759f16677bfd6c24c4ef63
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The existing default behavior has been deprecated for over a 18 months
(change I25828a3d68e2e900f498e17a0d01fb70be77548e). It's time for a new
default.
Change-Id: Iaf4fa931dcbf16c22933f63629c6a4d443ac5310
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These are all deprecated for over 18 months (change
I0dd38e5cb252a01d5817ed168be040b21b35e348). It's time to remove them and
simplify this code.
Change-Id: I9ee3bfebbad21eec3eb1b475a813bcbc450edea4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ibdd329a6db8bd176af065d7f5190f0901d3c3f8d
This affects the 'server create', 'server show', 'server rebuild' and
'server set' commands. We also fix a few mistakes around the fields
shown.
Change-Id: I9946e12146efff39f9ba1591c90a4a9bccd46919
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').
We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.
Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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>
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>
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>
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>
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