[Openstack-operators] [openstack-dev] [nova] about filter the flavor
Matt Riedemann
mriedemos at gmail.com
Tue Nov 20 22:07:14 UTC 2018
On 11/19/2018 9:32 PM, Rambo wrote:
> I have an idea.Now we can't filter the special flavor according
> to the property.Can we achieve it?If we achieved this,we can filter the
> flavor according the property's key and value to filter the flavor. What
> do you think of the idea?Can you tell me more about this ?Thank you very
> much.
To be clear, you want to filter flavors by extra spec key and/or value?
So something like:
GET /flavors?key=hw%3Acpu_policy
would return all flavors with an extra spec with key "hw:cpu_policy".
And:
GET /flavors?key=hw%3Acpu_policy&value=dedicated
would return all flavors with extra spec "hw:cpu_policy" with value
"dedicated".
The query parameter semantics are probably what gets messiest about
this. Because I could see wanting to couple the key and value together,
but I'm not sure how you do that, because I don't think you can do this:
GET /flavors?spec=hw%3Acpu_policy=dedicated
Maybe you'd do:
GET /flavors?hw%3Acpu_policy=dedicated
The problem with that is we wouldn't be able to perform any kind of
request schema validation of it, especially since flavor extra specs are
not standardized.
--
Thanks,
Matt
_______________________________________________
OpenStack-operators mailing list
OpenStack-operators at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
More information about the openstack-discuss
mailing list