diff options
| author | Zuul <zuul@review.opendev.org> | 2020-03-24 14:07:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-03-24 14:07:02 +0000 |
| commit | a0d7f98f184f634addbdf321d654674a714b2a43 (patch) | |
| tree | fa943ff55fab69e3692ccf3955597f6b14628f67 /openstackclient/network | |
| parent | 9e8960bad044d62f0d255018c501b6b637c4b3c1 (diff) | |
| parent | 711b9c9405c55ca8bb5649e2b56202845356e049 (diff) | |
| download | python-openstackclient-a0d7f98f184f634addbdf321d654674a714b2a43.tar.gz | |
Merge "Add "fields" parameter to ListSecurityGroup query"
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/security_group.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index f8153fa8..2033af14 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -202,6 +202,7 @@ class DeleteSecurityGroup(common.NetworkAndComputeDelete): # the OSC minimum requirements include SDK 1.0. class ListSecurityGroup(common.NetworkAndComputeLister): _description = _("List security groups") + FIELDS_TO_RETRIEVE = ['id', 'name', 'description', 'project_id', 'tags'] def update_parser_network(self, parser): if not self.is_docs_build: @@ -251,7 +252,8 @@ class ListSecurityGroup(common.NetworkAndComputeLister): filters['project_id'] = project_id _tag.get_tag_filtering_args(parsed_args, filters) - data = client.security_groups(**filters) + data = client.security_groups(fields=self.FIELDS_TO_RETRIEVE, + **filters) columns = ( "ID", |
