[RFE] Add ability to see what devices use a certain security group
Bug #1734026 reported by
Sam Morrison
This bug report is a duplicate of:
Bug #1405057: Filter port-list based on security_groups associated not working.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Wishlist
|
Unassigned |
Bug Description
Given a security group ID I would like an API to determine which devices (nova instances) use this security group.
Currently the only way to do this is by looking in the database and doing some SQL on the securitygrouppo
Changed in neutron: | |
importance: | Undecided → Wishlist |
Changed in neutron: | |
status: | New → Confirmed |
To post a comment you must log in.
Looking at the DB is not strictly needed. You could perform this query:
neutron port-list --device_owner compute:None -c device_id -c security_groups
e.g.
+------ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------+ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------+ 1ead-4601- 98c8-dd1e5dd026 a2 | [u'4a3a6c03- 463c-4f1e- 89e6-758a8ce2d1 8d'] | 78bf-4c30- ac8b-f4567768b0 ed | [u'325dee58- 4a20-404e- 9c45-1c1e9d22b3 af'] | ed91-4013- 8339-bc0ff03ba1 4d | [u'4a3a6c03- 463c-4f1e- 89e6-758a8ce2d1 8d'] | ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------+
| device_id | security_groups |
+------
| fac356fd-
| 6cbb2ee1-
| 62d647d0-
+------
And then filter client side by the security groups you care about.
Would that suffice?