Re: [openstack-dev] [nova] about filter the flavor

2018-11-20 Thread Matt Riedemann

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=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: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova] about filter the flavor

2018-11-19 Thread 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: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] about filter the flavor

2018-07-06 Thread Kristi Nikolla
OSC here refers to OpenStackClient [0].

[0]. https://docs.openstack.org/python-openstackclient/latest/

On Fri, Jul 6, 2018 at 4:44 AM Rambo  wrote:
>
>  Does the "OSC“ meas the osc placement?
>
>
> -- Original --
> From:  "Matt Riedemann";
> Date:  Mon, Jul 2, 2018 10:36 PM
> To:  "OpenStack Developmen";
> Subject:  Re: [openstack-dev] [nova] about filter the flavor
>
> On 7/2/2018 2:43 AM, 李杰 wrote:
> > Oh,sorry,not this means,in my opinion,we could filter the flavor in
> > flavor list.such as the cli:openstack flavor list --property key:value.
>
> There is no support for natively filtering flavors by extra specs in the
> compute REST API so that would have to be added with a microversion (if
> we wanted to add that support). So it would require a nova spec, which
> would be reviewed for consideration at the earliest in the Stein
> release. OSC could do client-side filtering if it wanted.
>
> --
>
> Thanks,
>
> Matt
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] about filter the flavor

2018-07-06 Thread Rambo
Does the "OSC“ meas the osc placement?
 
 
-- Original --
From:  "Matt Riedemann";
Date:  Mon, Jul 2, 2018 10:36 PM
To:  "OpenStack Developmen"; 

Subject:  Re: [openstack-dev] [nova] about filter the flavor

 
On 7/2/2018 2:43 AM, 李杰 wrote:
> Oh,sorry,not this means,in my opinion,we could filter the flavor in 
> flavor list.such as the cli:openstack flavor list --property key:value.

There is no support for natively filtering flavors by extra specs in the 
compute REST API so that would have to be added with a microversion (if 
we wanted to add that support). So it would require a nova spec, which 
would be reviewed for consideration at the earliest in the Stein 
release. OSC could do client-side filtering if it wanted.

-- 

Thanks,

Matt

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] about filter the flavor

2018-07-02 Thread Matt Riedemann

On 7/2/2018 2:43 AM, 李杰 wrote:
Oh,sorry,not this means,in my opinion,we could filter the flavor in 
flavor list.such as the cli:openstack flavor list --property key:value.


There is no support for natively filtering flavors by extra specs in the 
compute REST API so that would have to be added with a microversion (if 
we wanted to add that support). So it would require a nova spec, which 
would be reviewed for consideration at the earliest in the Stein 
release. OSC could do client-side filtering if it wanted.


--

Thanks,

Matt

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] about filter the flavor

2018-07-02 Thread 李杰
Oh,sorry,not this means,in my opinion,we could filter the flavor in flavor 
list.such as the cli:openstack flavor list --property key:value.
 
 
-- Original --
From: "Sahid Orentino Ferdjaoui"; 
Date: 2018年7月2日(星期一) 下午3:20
To: "OpenStack Developmen"; 
Subject: Re: [openstack-dev] [nova] about filter the flavor

 
On Mon, Jul 02, 2018 at 11:08:51AM +0800, Rambo wrote:
> 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.

Is that not the aim of AggregateTypeAffinityFilter and/or
AggregateInstanceExtraSpecFilter? Based on flavor or flavor properties
the instances can only be scheduled on a specific set of hosts.

https://git.openstack.org/cgit/openstack/nova/tree/nova/scheduler/filters/type_filter.py
https://git.openstack.org/cgit/openstack/nova/tree/nova/scheduler/filters/aggregate_instance_extra_specs.py

Thanks,
s.

> 
> Best Regards
> Rambo

> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] about filter the flavor

2018-07-02 Thread Sahid Orentino Ferdjaoui
On Mon, Jul 02, 2018 at 11:08:51AM +0800, Rambo wrote:
> 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.

Is that not the aim of AggregateTypeAffinityFilter and/or
AggregateInstanceExtraSpecFilter? Based on flavor or flavor properties
the instances can only be scheduled on a specific set of hosts.

https://git.openstack.org/cgit/openstack/nova/tree/nova/scheduler/filters/type_filter.py
https://git.openstack.org/cgit/openstack/nova/tree/nova/scheduler/filters/aggregate_instance_extra_specs.py

Thanks,
s.

> 
> Best Regards
> Rambo

> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova] about filter the flavor

2018-07-01 Thread 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.
















Best Regards
Rambo__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev