[openstack-dev] [nova] How can i check if an instance belongs to host-aggregate

Sylvain Bauza sbauza at redhat.com
Wed Mar 29 08:54:25 UTC 2017

Le 29/03/2017 10:23, Pradeep Singh a écrit :
> Hello,
> I want to filter out some instances(to avoid some operation on them)
> which are scheduled on  host-aggregates.
> How can i filter out these instances from all instances list in my cloud.

Aggregates are host-based. So, if you want to know the list of instances
running on specific aggregates, you first need to get the list of hosts
being in those aggregates and then you loop over each host for knowing
the instance list per host.

AFAIK, there is no helper method on the object side that does that
directly neither in the DB API, so that's a Python consumption.


> Thanks in advance!!
> Thanks,
> Pradeep Singh
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

More information about the OpenStack-dev mailing list