5708 Commits

Author SHA1 Message Date
Stephen Finucane
c7e3529dea Add pagination helpers
Add some pagination helpers to configure pagination parameters for
various commands. Two pagination schemes are supported, based on what we
currently support across OSC commands: marker-based pagination and
offset-based pagination.

Change-Id: I551bb4c3ff0568c6df5244a1d0f0669497bee58f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-11-03 23:16:18 +00:00
Zuul
8b253cbda8 Merge "Update the docker image to python3.11" 2023-11-01 10:49:31 +00:00
Clark Boylan
4673c89154 Update the docker image to python3.11
OpenDev is trying to get consumers of these images to update to newer
iterations so that old images can be dropped from the build list. OSC
is successfully running voting python3.11 unittest jobs at this point.
This should make it safe to update the Docker container image for OSC
to python3.11 without risk of regressions.

Making this update should bring some (small) performance updates as
py311 is generally quicker than py310. As mentioned before it will also
allow OpenDev to reduce the set of images that are being built.

Change-Id: I01e3c9e27f92205979ea6562b23f0f7f3b431728
2023-10-31 18:44:00 +00:00
Zuul
dfcb8b0ee7 Merge "trivial: Make better use of argparse" 2023-10-31 15:00:24 +00:00
Zuul
5883bcecd4 Merge "volume: Add alias for volume type AZs" 2023-10-31 15:00:20 +00:00
Zuul
e13f948ae5 Merge "volume: Add aliases for common volume type props" 2023-10-31 15:00:18 +00:00
Zuul
456c66ff63 Merge "volume: Allow filtering volume types by properties" 2023-10-31 14:53:36 +00:00
Zuul
d735b6cc07 Merge "volume: Support same_host, different_host hint as list" 2023-10-31 14:53:35 +00:00
Zuul
8b019fa7ea Merge "Update from storyboard to launchpad pt. 2" 2023-10-31 12:57:08 +00:00
Zuul
c258d196a4 Merge "Migrate resource filter commands to SDK" 2023-10-31 10:25:55 +00:00
Zuul
43cec266d9 Merge "Add "image metadef property create" command" 2023-10-31 09:28:54 +00:00
Zuul
b6baa2e398 Merge "Add "image metadef property show" command" 2023-10-31 09:28:52 +00:00
Zuul
e76a66657f Merge "Add "image metadef property list" command." 2023-10-31 09:28:47 +00:00
Dr. Jens Harbott
692ee752b6 Update from storyboard to launchpad pt. 2
This was missed in [0]. Also update the mailing list link after it moved
to mailman3.

[0] Iaf93c892d211fd7465395d8830f56c2977a88f8b

Change-Id: I91168713a854be0c4348bab3fa34f4b1a924f451
2023-10-31 10:19:43 +01:00
Zuul
5711998603 Merge "Switch back to Launchpad" 2023-10-31 08:58:30 +00:00
Johannes Kulik
60a0e379a4 volume: Support same_host, different_host hint as list
When creating a volume, the scheduler hints can be supplied as strings.
The "same_host" and "different_host" hints can also be supplied as a
list if affinity/anti-affinity to multiple volumes is requested [0]

The previously-used `KeyValueAction` only supplies strings as values - the
last one if multiple --hint contain the same key. An alternative already
used in `CreateServer` would be `KeyValueAppendAction`, but only a subset of
the scheduler hints accept lists, so we cannot use that in general.

Therefore, we create `KeyValueHintAction`. It contains both a
`KeyValueAction` and a `KeyValueAppendAction` object and calls the
appropriate action based on the beginning of the given values as defined
in `APPEND_KEYS`.

[0] d96b705774/cinder/api/schemas/scheduler_hints.py (L31-L65)

Change-Id: Ida7f4662dc9fea24510758541fd4f2622b73bf31
2023-10-31 09:22:25 +01:00
Rajat Dhasmana
ae10851a68 Migrate resource filter commands to SDK
This patch migrates ``block storage resource filter list`` and
``block storage resource filter show`` commands to SDK.

Change-Id: Ibc50963954418aab0be35e120f8dcfadbe4020b8
2023-10-30 12:06:14 +05:30
Zuul
53e7d713f0 Merge "Migrate volume backend commands to SDK" 2023-10-27 17:35:06 +00:00
Stephen Finucane
2a2a6e1781 trivial: Make better use of argparse
Change-Id: Ib76c0d18bf5e44bfb4dcd9d729d9a1c5635cdba7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-10-27 17:58:36 +01:00
Stephen Finucane
a3410cd4f7 volume: Add alias for volume type AZs
Another quality of life improvements. The key for this one is weird and
the whole thing is a little more involved, hence why it's kept separate.

Change-Id: I75aa85f27905104dc84fffe823c01b4c90a6a822
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-10-27 17:58:13 +01:00
Stephen Finucane
e0c7cef434 volume: Add aliases for common volume type props
Add aliases for the enabling multiattach, caching and replication via
extra spec properties. These are useful since the syntax for setting
each of them is a bit weird and frankly not very discoverable.

Change-Id: I08b51224c66a34a9dcfcffc95847e61d9aac0e7e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-10-27 17:57:39 +01:00
Zuul
491e5b9e9a Merge "tests: Add compute v2 FakeClientMixin" 2023-10-27 16:38:55 +00:00
Zuul
f576cb62b6 Merge "tests: Use consistent shortcut to fake compute client" 2023-10-27 16:38:53 +00:00
Zuul
14a4f89030 Merge "tests: Add volume v1, v2, v3 FakeClientMixin" 2023-10-27 16:23:55 +00:00
Zuul
dd5a21ff02 Merge "tests: Use consistent shortcut to fake volume client" 2023-10-27 16:23:53 +00:00
Zuul
b884e83e37 Merge "tests: Use central SDK client fake" 2023-10-27 16:20:27 +00:00
Stephen Finucane
67bec7785c volume: Allow filtering volume types by properties
Starting in volume API microversion 3.52, it is possible to filter
volume types by extra specs (a.k.a. properties). Even non-admins can do
this for so-called "user visible" extra specs. Make it possible to do
this.

While we're here, the test file is renamed to match the name of the
module under test.

Change-Id: Ia9acc06c0c615bf24e12b63146ea97ac2505f596
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-10-27 16:37:15 +01:00
gtema
5d1d6b5a06 Switch back to Launchpad
Change the links to issue tracker.

Change-Id: Iaf93c892d211fd7465395d8830f56c2977a88f8b
2023-10-25 18:56:25 +02:00
Slawek Kaplonski
7b99b57165 Add support for default security group rule CRUDs
Change-Id: I1c18c2ec5eb4923e1ab8b3fc6199ef6f329b4a4d
2023-10-19 16:04:22 +02:00
Cyril Roelandt
d9c4c43a40 Add "image metadef property create" command
Change-Id: Icb4fab0aef13b28212771da3a3b7c4a0775bb38e
2023-10-18 13:26:15 +00:00
Cyril Roelandt
190f06a963 Add "image metadef property show" command
Change-Id: I326735014dfcb4477b109a99aa31f71b07b91c7b
2023-10-18 12:39:39 +00:00
Cyril Roelandt
5fb922e469 Add "image metadef property list" command.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/857727
Change-Id: I8f6692e779c4721225052d348b4b947a545bd6c0
2023-10-18 12:39:35 +00:00
Rajat Dhasmana
39a084f91c Migrate volume backend commands to SDK
This patch migrates following volume backend commands to SDK:

volume backend capability show
volume backend pool list

Change-Id: Idded38a5f87d51574426c4ac10c806af52984b7c
2023-10-12 01:14:35 +05:30
Zuul
0fb1cae1a8 Merge "Fix "server create"command with --boot-from-volume" 2023-10-11 15:59:24 +00:00
Zuul
98fbc56603 Merge "Fix --security-group for port list" 2023-10-11 15:59:22 +00:00
Stephen Finucane
912a21a8fd tests: Add compute v2 FakeClientMixin
This ensures we are speccing the compute proxy API.

Change-Id: I7adbf2666d71f222fbd9c1479216f72cb9893348
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:14:32 +01:00
Stephen Finucane
187a454ec0 tests: Use consistent shortcut to fake compute client
This removes the need for a number of base test case subclasses. We use
'compute_client' rather than 'client' to avoid conflicts with clients
for other services.

Change-Id: I430214cd79eca481bd8d8c53bf97eaede6766eb4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:14:32 +01:00
Stephen Finucane
98fb1678bc tests: Add volume v1, v2, v3 FakeClientMixin
This ensures we are speccing the image proxy API, as we did previously
for the network tests in Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758.

Change-Id: I132ccd1170cc903f6edc505926b071170aeaa08c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:14:32 +01:00
Stephen Finucane
4cabf6f7a2 tests: Use consistent shortcut to fake volume client
This removes the need for a number of base test case subclasses. We use
'volume_client' rather than 'client' to avoid conflicts with clients for
other services.

Change-Id: I28d78f32142bb3a3fde0ba1780c504adc31cc77c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:14:30 +01:00
Stephen Finucane
02cc064258 tests: Use central SDK client fake
Avoid double mocking.

Change-Id: Ic8fadd41f3687eabd3a149681effae6883edb12e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:12:19 +01:00
Zuul
3c10b01480 Merge "Update branch regexes for tips jobs" 2023-09-28 09:48:22 +00:00
Dr. Jens Harbott
2e09b2bf3e Update branch regexes for tips jobs
Using negative lookahead is deprecated, let the jobs be run simply only
on the master branch for now.

Change-Id: Ia53fffb0a3f61cbf85edd96fbeeb5138a88d4d0a
2023-09-20 07:08:09 +02:00
Christian Rohmann
98b949646c Add is_incremental to ListVolumeBackup
It's of interest which backups are incremental or full. Returning this
information as a column to the list of backups.

Change-Id: I766330228634d5db678df11c23877077a3635372
2023-09-19 22:10:04 +02:00
Zuul
619925e45f Merge "Remove use of oslo.utils" 2023-09-19 13:14:12 +00:00
Zuul
5f4082d046 Merge "Add a warning for resizing servers booted from volumes" 2023-09-19 13:14:06 +00:00
Zuul
7c0bdd5e7e Merge "volume: Deprecate '--detailed' options" 2023-09-19 13:11:32 +00:00
Zuul
cab84d6760 Merge "tests: Explicitly specify port fields for output" 2023-09-19 13:11:31 +00:00
2737e063b5 Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: I608edcb863038522677beb8bd2e1eb98c1eec363
2023-09-15 16:03:09 +00:00
Stephen Finucane
fb2e0ced6e tests: Explicitly specify port fields for output
Rather than excluding the few fields we don't want, explicitly indicate
the ones we do want. We were already in-effect doing this in our tests,
so this is simply moving the definition from tests to the main code.

Note that this is a problem in the tests for virtually all commands
that will be seen as the SDK continues to evolve and new fields are
added to existing resources. This is a problem that be solved over
time though, rather than in a big bang commit.

Change-Id: Iaa64e97450f5c73cab2e2c3b0c741aec1495b4f1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-12 08:33:20 +00:00
Stephen Finucane
08551106e6 Remove use of oslo.utils
While a relatively small library, this is one import that we really
don't need. Remove it.

Change-Id: I726f3c3548cbd896588ef0613222e36c529f5bcc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-11 11:02:55 +01:00