vinfra service compute security-group list

List security groups:

usage: vinfra service compute security-group list [--long] [--limit <num>]
                                                  [--marker <marker>]
                                                  [--name <name>] [--id <id>]
                                                  [--project <project>]
--long
Enable access and listing of all fields of objects.
--limit <num>
The maximum number of security groups to list. To list all security groups, set the option to -1.
--marker <router>
List security groups after the marker.
--name <name>
List security groups with the specified name or use a filter. Supported filter operator: contains. The filter format is <operator>:<value1>[,<value2>,…].
--id <id>
Show a security group with the specified ID or list security groups using a filter. Supported filter operator: in. The filter format is <operator>:<value1>[,<value2>,…].
--project <project>
List security groups that belong to the specified project ID. Can only be performed by system administrators.

Example:

# vinfra service compute security-group list -c id -c name
+--------------------------------------+---------+
| id                                   | name    |
+--------------------------------------+---------+
| 062f75cf-abc0-419d-bb1a-92989ad9383f | default |
| 12e6b260-0b61-4551-8168-3e59602a2433 | mygroup |
+--------------------------------------+---------+

This command lists security groups in the compute cluster.