[nova] about filter the flavor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[nova] about filter the flavor

Rambo
Hi,all

      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.










__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [hidden email]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Reply | Threaded
Open this post in threaded view
|

Re: [nova] about filter the flavor

Matt Riedemann-3
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 Development Mailing List (not for usage questions)
Unsubscribe: [hidden email]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev