Skip to content

feat(cli): Add --os-microversion-strategy flag - #1946

Merged
gtema merged 1 commit into
mainfrom
cli/microversion-strategy-flag
Aug 14, 2026
Merged

feat(cli): Add --os-microversion-strategy flag#1946
gtema merged 1 commit into
mainfrom
cli/microversion-strategy-flag

Conversation

@gtema

@gtema gtema commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Exposes a global --os-microversion-strategy floor|ceiling flag
(OS_MICROVERSION_STRATEGY env var) so users can opt into requesting
the highest compatible microversion instead of the historical
lowest-compatible default. Wires through to
AsyncOpenStack::builder(...).microversion_strategy(...), which now
consistently drives both the request header and generated dispatch
schema selection via resolve_microversion. Default stays Floor to
preserve existing behavior.

Signed-off-by: Artem Goncharov artem.goncharov@gmail.com

Exposes a global --os-microversion-strategy floor|ceiling flag
(OS_MICROVERSION_STRATEGY env var) so users can opt into requesting
the highest compatible microversion instead of the historical
lowest-compatible default. Wires through to
AsyncOpenStack::builder(...).microversion_strategy(...), which now
consistently drives both the request header and generated dispatch
schema selection via resolve_microversion. Default stays Floor to
preserve existing behavior.

Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema merged commit 0f346ee into main Aug 14, 2026
20 checks passed
@gtema-release-plz gtema-release-plz Bot mentioned this pull request Aug 14, 2026
@garloff

garloff commented Aug 16, 2026

Copy link
Copy Markdown

Thanks, Artem! It sort of works ...

garloff@dev2018(:art-ucs):/casa/src/OpenStack/openstack [0]$ ./target/release/osc compute server list
┌──────────────────────────────────────┬────────────┬────────┬──────────────────────┬───────┬────────┬─────────────────────────────────┐
│ id                                   ┆ name       ┆ status ┆ created              ┆ image ┆ flavor ┆ security_groups                 │
╞══════════════════════════════════════╪════════════╪════════╪══════════════════════╪═══════╪════════╪═════════════════════════════════╡
│ 236fe824-0f66-47f0-86dd-0023aef1252a ┆ SCS_UCS_NC ┆ ACTIVE ┆ 2025-01-17T22:41:23Z ┆ null  ┆ null   ┆ [{"name":"SSH"},{"name":"HTTP"} │
│                                      ┆            ┆        ┆                      ┆       ┆        ┆ ,{"name":"ICMP"},{"name":"HTTPS │
│                                      ┆            ┆        ┆                      ┆       ┆        ┆ "},{"name":"SMTP"},{"name":"def │
│                                      ┆            ┆        ┆                      ┆       ┆        ┆ ault"}]                         │
│ bff06941-8a5d-4b68-948e-fcd66aa71696 ┆ OS156      ┆ ACTIVE ┆ 2025-01-17T16:11:21Z ┆ null  ┆ null   ┆ [{"name":"SSH"},{"name":"defaul │
│                                      ┆            ┆        ┆                      ┆       ┆        ┆ t"}]                            │
└──────────────────────────────────────┴────────────┴────────┴──────────────────────┴───────┴────────┴─────────────────────────────────┘
garloff@dev2018(:art-ucs):/casa/src/OpenStack/openstack [0]$ ./target/release/osc compute server list --os-microversion-strategy ceil
error: invalid value 'ceil' for '--os-microversion-strategy <OS_MICROVERSION_STRATEGY>'
  [possible values: floor, ceiling]

  tip: a similar value exists: 'ceiling'

For more information, try '--help'.
garloff@dev2018(:art-ucs):/casa/src/OpenStack/openstack [2]$ ./target/release/osc compute server list --os-microversion-strategy ceiling┌──────────────────────────────────────┬────────┬──────────────────────┐
│ id                                   ┆ status ┆ created              │
╞══════════════════════════════════════╪════════╪══════════════════════╡
│ 236fe824-0f66-47f0-86dd-0023aef1252a ┆ ACTIVE ┆ 2025-01-17T22:41:23Z │
│ bff06941-8a5d-4b68-948e-fcd66aa71696 ┆ ACTIVE ┆ 2025-01-17T16:11:21Z │
└──────────────────────────────────────┴────────┴──────────────────────┘

Maybe I now better understand why you default to the lowest microversion -- the list of output fields matches it.
Let me see whether I can come up with a template that is good for current OpenStack ...
Sidenote: 0.13.3 did somehow succeed in displaying flavor names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants