@@ -62,6 +62,11 @@ def _get_attrs(client_manager, parsed_args):
6262 object_id = network_client .find_address_scope (
6363 parsed_args .rbac_object ,
6464 ignore_missing = False ).id
65+ if parsed_args .type == 'subnetpool' :
66+ object_id = network_client .find_subnet_pool (
67+ parsed_args .rbac_object ,
68+ ignore_missing = False ).id
69+
6570 attrs ['object_id' ] = object_id
6671
6772 identity_client = client_manager .identity
@@ -101,11 +106,11 @@ def get_parser(self, prog_name):
101106 '--type' ,
102107 metavar = "<type>" ,
103108 required = True ,
104- choices = ['address_scope' , 'security_group' ,
109+ choices = ['address_scope' , 'security_group' , 'subnetpool' ,
105110 'qos_policy' , 'network' ],
106111 help = _ ('Type of the object that RBAC policy '
107- 'affects ("address_scope", "security_group", '
108- '"qos_policy" or "network")' )
112+ 'affects ("address_scope", "security_group", "subnetpool", '
113+ ' "qos_policy" or "network")' )
109114 )
110115 parser .add_argument (
111116 '--action' ,
@@ -194,11 +199,11 @@ def get_parser(self, prog_name):
194199 parser .add_argument (
195200 '--type' ,
196201 metavar = '<type>' ,
197- choices = ['address_scope' , 'security_group' ,
202+ choices = ['address_scope' , 'security_group' , 'subnetpool' ,
198203 'qos_policy' , 'network' ],
199204 help = _ ('List network RBAC policies according to '
200205 'given object type ("address_scope", "security_group", '
201- '"qos_policy" or "network")' )
206+ '"subnetpool", " qos_policy" or "network")' )
202207 )
203208 parser .add_argument (
204209 '--action' ,
0 commit comments