Microversion negotiation support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
placement-osc-plugin |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I suggest osc-placement implements some kind of microversion negotiation to avoid users seeing this:
$ openstack resource provider list --resource CUSTOM_BAREMETAL=1
Operation or argument is not supported with version 1.0
This is quite obvious for people well familiar with microversioning and is extremely confusing for everyone else. This message, by the way, is particularly bad because it does not mention the expected version. It gives an unprepared user an impression that the server does not support the operation. To top it all, "latest" is not supported by OSC.
In ironicclient we implement the negotiation as picking by default the highest microversion that both the server and the client support (you need to keep track of client support, of course). I recommend osc-placement takes the same approach.
One of the primary reasons for designing microversions the way they are is that a user should never receive different results (structure, not data, of course) when making the same request. Always getting 'latest' means that if a new microversion is introduced that alters a response, the user will automatically get this new structure that they may not be able to parse.
I understand the convenience argument, but as a compromise I would suggest making this behavior very explicitly opt-in.