We also reorder the proxy API to combine two groups.
Change-Id: Id9cb8f7cdffa374bdb4f744cf2d12fbe2709904e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is kept separate from addition of the actual hook so that we can
ignore the commit later.
Change-Id: I3af752894490d619b3ef755aca5e717edafe104c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
It's a waste of time: pre-commit doesn't need it.
(I tested and our own hacking hooks continue to work)
Change-Id: I4fe6bedc9ddf1f83bc9ddf037a9eae76dfde6f83
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit resolves an issue in the delete_limit method of the
Identity V3 Proxy class. The method was incorrectly trying to
access a 'Limit' attribute of a 'Limit' object, causing an
AttributeError. The fix involves correctly passing the 'Limit'
class from the '_limit' module as the first argument to the
'_delete' method.
Closes-Bug: #2052650
Change-Id: I435f52f8085c899fe1be57fcd5a2ce6f04618427
We are using a mixin-like pattern to construct the cloud layer of our
API. However, this is not a true mixin pattern since each of the
"mixins" have dependencies on each other and to be honest, it's really
only there to allow us to split up the otherwise giant 'Connection'
object. Unfortunately this pattern doesn't really work with type
checkers or language servers since there's no obvious way to identify
where the additional resources are coming from until they're combined in
the 'Connection' class. Fixing this will require multiple steps, but the
first it to remove all dependencies between the various service mixins.
As such, rather than depending on e.g. the 'get_volume' cloud method in
various compute-related cloud methods, we use the 'find_volume' proxy
method. A later change can then add these various proxy attributes,
exposing them.
Change-Id: I10d3782899ac519f715d771d83303990a8289f04
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Before we combine the various nova-net/neutron common network functions
address a few nits around return statement indentation and docstring
wrapping.
Change-Id: I992673d30225c6639012fd4add91e86ac5e72966
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We'd like to get rid of the openstack.cloud.exc module. This exception
has one user so it is an easy cull.
Change-Id: I9b6a96d3b4d66ed69d87ba2a1d27bee9bab8c98d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also move everything to a new module with no external imports so
flake8 can import it without needing to install all the dependencies of
openstacksdk.
Change-Id: I8e610bc196f530223b27a6fbb8e8ca11b6420b82
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Highlight that one can do e.g. `conn.compute.get('/servers')`. You
almost certainly *don't want* to do this, but it can be helpful (see:
our support for Nova's os-hypervisors API in OSC).
The flow of the README is modified slightly so we go sequentially from
high-level layers to low-level layers. Rubrics (header-like elements
that don't produce anchors or appear in tables of contents) are also
added to produce improve information hierarchy.
Change-Id: Ifd4a5a2c753f6698fa4384a197e81cc5383ef312
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We apply fold in the new black changes also.
Change-Id: I632728aa81e6c55423c0275a0a9b35e0753980a6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
BGPVPNs can be filtered server-side when being listed. The most
interesting filters here are for routers, networks and ports, as these
allow to filter for a specific association the BGPVPN has, but the other
filter options might come in handy as well.
route|import|export-target support only exact matches in the BGPVPN API,
meaning all entries need to be given in the right order as a comma
separated string. As this is quiet counter-intuitive for a user (that
might expect they could provide only one or unsorted entries) these
attributes have been left out.
Change-Id: I355b6584e115cf70a7fd040a24d30f9686555b85
Change I3b897abccfecf9353be07abc8f8325d91f3eb9d4 introduced support for
multiple image stores. Unfortunately a typo was included that has been
carried forward since. Correct the mistake now and add a test to prevent
regressions.
Change-Id: I4d2c81d19d295aae8a77007a1c7de7083d061f24
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change I084336ba41147f824b92dc07235e5f19b7ac4a9c introduced mypy
syntax which breaks Python releases before 3.10. Unfortunately, for
2024.1 we commit to supporting Python back to 3.8.
Specifically, you receive this error message if you run pep8:
pep8 mypy.....................................................................Failed
pep8 - hook id: mypy
pep8 - exit code: 1
pep8
pep8 openstack/object_store/v1/_proxy.py: note: In member "generate_temp_url" of class "Proxy":
pep8 openstack/object_store/v1/_proxy.py:1049:21: error: X | Y syntax for unions requires Python 3.10 [syntax]
pep8 Found 1 error in 1 file (checked 410 source files)
I asked some buddies, and we're fairly sure that this line would
crash the runtime on Python 3.8, because its a syntax error.
So instead, let's use typing syntax compatible with other pythons.
Change-Id: I0a5f57346c7ff469ffe1b93051e470141117ada9