Quotas details returned from the Neutron service are in different format
then quota details returned from Nova and Cinder services. This patch
fixes helper function to convert data from Neutron to the same
format as data from Nova and Cinder is given.
Closes-Bug: #2102513
Change-Id: I18649f6c2ee179b64b7e605f4ea07d4b0c7a1635
The fix ensures that if a user wants to set a default project,
they must also provide the project domain. If it's missing,
an explicit error message is shown, making it clear that the
project domain is required.
Also adding some unit tests by modifying respective calls.
Change-Id: Ia6e921a53da55ab1bce85a42c8160872a9d47d64
Closes-Bug: #2102146
the flag should store False to 'allow_failure', not True.
Also, make the --allow-failure and --disallow-failure flags
mutually exclusive.
Change-Id: I03699e14d4d69d9f08caab647293732fc211dbad
openstacksdk's Credential expects user_id and project_id, not user and
project. Previously, we would send payloads like
{'type': 'ec2', 'blob': '{"access": "s3-user1", "secret": "s3-secret1"}'}
which Keystone would reject with
'user_id' is a required property
Change-Id: I0544bef7df9247395f0726ea075112d6ac992252
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
The '--flavor' option appears in the usage and arglist but is not
actually parsed. The '--flavor-id' option is what is silently parsed.
Since the goal is to allow the name or the id, this adds the '--flavor'
option to being parsed.
Closes-Bug: 2091731
Change-Id: Id83facd3825f472e7d864427699bd072d1c08779
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
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
creating the image is a 2step process, first an 'empty' image is created
and then the data is uploaded.
Currently the output of the 'image create' command is that 'empty'
image, in `queued` status etc.
A more user friendly approach would be to make a second refresh call
to show the user image as it is after data was uploaded.
Change-Id: I2f78b113dcc3c941f8cf8dd9b63262971a780a39
Currently the volume backup restore command returns with error
even though the restore is initiated.
This patch corrects the response received from SDK and processes
it in a human readable form.
Change-Id: I7f020631fbb39ceef8740775fd82686d90a6c703
Closes-Bug: #2063335
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/931755
For some reason we were setting a property mock on the FakeClientManager
class. In multiple places, no less. This has a nasty habit of causing
side-effects in other tests, depending on the order that tests run in.
Resolve this simply setting the attribute as we'd expect.
Change-Id: I8bf9055e3f5b885dd5a7a6d751b774934da4a7d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
By passing a dict instead of a single value, we force SDK to populate
the correct attribute on the object.
Change-Id: I9f4c5964dc0546215474c92db567966ffad68a1a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-bug: #2089821
To allow users to create servers with no security groups associated with
the ports.
Change-Id: I91b1d9dd5c3fbba838640841d98341cd8ccb1b16
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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>