Implement resource locks and access rules restrictions feature
in the openstacksdk.
Depends-On: Ib9f65a4523222f1224d51534c5061f90501b59d3
Change-Id: I45f9b06b1b41756d34f39604c82e28fd4eb102de
the _list method goes straight through to formatting base_path with attrs,
and for server migrations the attr in the base path is server_uuid,
not server_id.
This patch fixes the base_path of the ServerMigration resource
to use server_id stanza.
Change-Id: I44335a22846f1a11ba60e8bb758b10c39e728897
Story: 2010633
Task: 47591
We are running functional tests in zuul without a 'pyNN' factor (e.g.
'tox -e functional'). For this to work, we need to allow an empty
factor, i.e. we want:
[testenv:functional{,-py310}]
rather than:
[testenv:functional{-py310}]
(note the missing comma)
Unfortunately we missed this as tox 4 has a currently unaddressed
regression [1] that results in it running the base testenv in the case
there is only a partial factor match. That needs to be fixed for avoid
this biting us again the future, but we can at least fix it for now.
[1] https://github.com/tox-dev/tox/issues/3219
Change-Id: Ib9f65a4523222f1224d51534c5061f90501b59d3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Build upon I897325032ee7b0f559906e82be7f3a7695768c52 to give an
additional example using a service user.
Change-Id: Iac2b85ac19d100c68a9039583b55437aa8b4494e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Example conn.network.create_security_group_rule() in examples/network/security_group_rules.py
uses wrong protocol type protocol='HTTPS'. HTTPS is not allowed value,
allowed values are: icmp, udp, tcp. It should be "protocol='tcp'" instead.
Closes-Bug: #2052860
Change-Id: I0fb0532ca562bcf93672a1ca3f1ce2e3ad864c6d
Fix the issues this uncovers. We also migrate to the native hacking
pre-commit hook.
Change-Id: I44385c25fcb010f3e62b4098fd34ae3290292630
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The changes here are all small enough to be bundled into one.
Change-Id: Ia585244e314a9bd18a7cd2388a2936517e25dbf2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This one is cool. We use overload to allow the value of 'Resource.find'
and 'Proxy._find' to vary depending on whether 'ignore_missing' is True
or False.
Change-Id: I386e10774dfb6ec9db80cbda9757446a2b5e4e57
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Yet another bug here: we weren't passing 'session' arguments.
Change-Id: Id9c5bafe8bc71024ff6d453870553dd45b6576d1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Another small bug to be corrected here: SDKException does not have a
'response' attribute.
Change-Id: I084336ba41147f824b92dc07235e5f19b7ac4a9c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Just an incorrect type annotation to correct here. We need to figure out
a way to properly type the 'Resource' class with all its magic.
Change-Id: Id238b870de85a4663032710d1c15f6e200d2d543
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
To prevent regressions. We also switch to retrieving only the ID of
provided resources, which should be faster.
Change-Id: Id61340ae026a41c77ce9d9ca031f488f1bf82c61
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Another bug highlighted. A test will come later so as not to confuse
this patch.
Change-Id: I38f1a3911781470b77644cd42512408f8c03dc4d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Our first significant bug! We were registering the 'group_type' module
rather than the 'GroupType' resource in our block storage v3 proxy's
resource registry. This is corrected. The rest of the changes are simply
to work around mypy (obviously) not being able to detect the key and
value types for empty dicts. Cinder doesn't care about the values of the
dict for most WSGI actions so this doesn't matter.
Change-Id: I4d9a4d4fcf08e8aa13b47314b24b2bb7226be3eb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>