[Openstack] heat autoscaling group instance relationships
I'm trying to figure out how to determine all instances that were created as part of a given autoscaling group. I want to take a given autoscalinggroup and list all of its instances. So far I can't figure out how to dothis. The instances themselves have a tag called "AutoScalingGroupName"( mystack-MyServerGroup-f3r72ifsj2jq for example ) but the value of thatdoesn't seem to map to anything. A resource-show on the autoscaling groupdoesn't seem to show any identifier that maps to the autoscaling groupname.
Any ideas on how I can do this? Thanks!
該郵件大體的意思是,如何通過 Heat API 擷取 Autoscaling Group 裡的虛拟機清單。
一.需求
以 Heat 推薦的 Autoscaling Group 的 HOT 模闆為例子,采用該模闆建立 Stack 後,查詢該 Stack 包含的 resource 如下,可知 asg 即為 AutoScalingGroup resource。
查詢 Nova 發現 Autoscaling Group 旗下有兩台虛拟機。
繼續查詢 asg 詳情,并無任何和虛拟機相關的資訊,而事實上,Autoscaling Group 作為一群虛拟機的集合,使用者非常希望能擷取 Autoscaling Group 下虛拟機的數量,虛拟機的m名稱等等。如果 Heat 未提供該 API,那麼使用者隻能通過 Nova API 查詢相關的虛拟機,這對使用者來說,無疑增加了操作的複雜程度。