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
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>
There is a flaw (IMO) in the design of Nova's os-quota-sets API: despite
project IDs forming the identifier for an individual resource, we get a
HTTP 400 (Bad Request) error if you pass an ID that does not exist,
rather than the HTTP 404 (Not Found) we would expect.
Correct this, noting why we're doing what we're doing for readers from
the future (hi!). Note that HTTP 400 is unfortunately quite broad and
means we'll also catch things like invalid requests but the exception
may have been translated so we can't rely on a string match.
Change-Id: I720502930d50be8ead5f2033d9dbcab5d99a37a9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2091086
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>
devstack no longer installs ceilometer services unlesss ceilometer
devstack plugin is enabled, so we can safely remove the options to
disable ceilometer services.
This allows us to remove references to removed services such as
ceilometer-api .
Change-Id: I4201878d0deba4490cf2a08bbabec8fe64474385
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>
oslotest is not used anywhere, while requests is already a runtime dep.
Change-Id: I852b7d8664cddf22b1314b057c42930580a1f9f4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We only need to care about the unversioned tips jobs since [1] will take
care of the others.
[1] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/933197
Change-Id: I3d569dc496a995eee58fdbcf4a42a187143d1b24
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The sooner we have type hints in SDK, the better /o\
Change-Id: Iaf9596aea02f683c280ae68504a14d43dbd6134a
Closes-bug: #2077634
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Fix the wrong value assignment which made the --user-domain option
ignored. Unit tests are updated to verify usage of domain options to
avoid further regressions.
Also drop the redundant look up of domain id to avoid unnecessary API
call.
Closes-Bug: #2085604
Change-Id: I5112b8e831fb26eb6544615277f0d3fe4f15dc5a
Removing project from network_flavor_profile as neutron api
does not uses project.
Closes-Bug: 2046496
Change-Id: I77b0544cf8629fb0a5b9914361a007d28b2b5662
This is a fun one driven by two separate changes. We recently started
checking whether the volume service was available before setting quotas
in order to allow us to use quota set for other services [1]. This
merged a number of weeks ago and was included in 7.1.0. More recently,
we modified DevStack to stop publishing a service catalog entry with a
service type of 'volumev3', preferring instead to use the correct
'block-storage' service type. Taken separately, neither of these changes
would have caused issues. Together, they mean our lookups for the volume
service now fail and we can't set volume quotas.
Fix things by checking for the block-storage service type also. A future
change will raise a warning (later an error) if the volume service is
not found and you're attempting to set a quota since this is clearly a
mistake.
Change-Id: Ibbeef52225e18757cd28d0fbfb14c1ca06975b60
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2084580
When we show a volume backup by name, it calls the get_backup
method in SDK which is only used for getting a backup by ID.
This patch modifies the approach to call find_backup method
which first tries the find by ID and then find by name logic
eventually returning the backup details.
Story: 2011234
Task: 51127
Change-Id: I926d8de9810fcf2e5335bbe35aaab15e1e36a5cb