How to know the openstack client's default microversion?
Without the version option e.g. --os-compute-api-version, the openstack client submits API requests with certain default microversions. The precise microversions vary with the openstack client's version and the specific task. For example, the --debug option reveals that openstack client 7.1.3 uses Nova microversion 2.89 when attaching a volume to an instance. Is there a simpler way than --debug to find out which microversions the client uses? Is there a command, or perhaps a website where this is documented? Thanks for your ideas! Bernd.
When the unified openstack client was first created it had a design goal of providing a stable scripting interface. to achive that it by design alwasy defaulted to the oldest microversion. for a long time plugin ignore the requirement to not negocated the latest version in an effort to keep the behavior between the project specific client and the osc plugin the same. As the maintainer that orginally created OSC left and the push form project teams to prioritising the ux of humans over scriting gained traction the defautl behaiovr was changed to auto negociate the latest microversion. if you are using osc form approxiatly the bobcat? release or newer then the nova related commands along with most other command are now negocaiting the latest version supported by the cloud they are talkign too. this is even more true as commands are moved to use the SDK instead of hte project client direct. i cant say definitely but as of osc version 7.0.0 i believe all commands support version negotiation but i could be wrong about that. The basic logic behid the current approach is, if you are a human, you should know what release of openstack you are interacting with and can read the help text or api refs for the relevant clouds/service to know if you want to opt into a specific behavior or if latest is correct. if your writing a script that uses osc the recommendation has always been to always pass the microverion that provides the behavior you want instead of relying on the old or new behavior to do the right thing. each service that supprot microvions has a version discover endpoint that you can curl without auth its the base url of the service that you can see in the keyston endpoint list. i do not think there is currently an "openstack version list" command or similar to pretty print this info for you in osc. one could be added i guess, but i dont think anyoen has propsoed that in the past. https://that.guru/blog/api-versioning-in-openstack/ might also be useful context as not all services use microversion or use them the same way. On 20/01/2025 15:41, berndbausch@gmail.com wrote:
Without the version option e.g. --os-compute-api-version, the openstack client submits API requests with certain default microversions. The precise microversions vary with the openstack client's version and the specific task.
For example, the --debug option reveals that openstack client 7.1.3 uses Nova microversion 2.89 when attaching a volume to an instance.
Is there a simpler way than --debug to find out which microversions the client uses? Is there a command, or perhaps a website where this is documented?
Thanks for your ideas!
Bernd.
participants (2)
-
berndbausch@gmail.com
-
Sean Mooney