@@ -67,6 +67,11 @@ def _get_attrs(client_manager, parsed_args):
6767 object_id = network_client .find_address_group (
6868 parsed_args .rbac_object ,
6969 ignore_missing = False ).id
70+ if parsed_args .type == 'bgpvpn' :
71+ # BPGVPN will be available only when
72+ # bgpvn extension is enabled
73+ if network_client .find_extension ('rbac-bgpvpn' ):
74+ object_id = parsed_args .rbac_object
7075
7176 attrs ['object_id' ] = object_id
7277
@@ -107,10 +112,10 @@ def get_parser(self, prog_name):
107112 '--type' ,
108113 metavar = "<type>" ,
109114 required = True ,
110- choices = ['address_group' , 'address_scope' , 'security_group ' ,
111- 'subnetpool' , 'qos_policy' , 'network' ],
115+ choices = ['address_group' , 'address_scope' , 'bgpvpn ' ,
116+ 'security_group' , ' subnetpool' , 'qos_policy' , 'network' ],
112117 help = _ ('Type of the object that RBAC policy '
113- 'affects ("address_group", "address_scope", '
118+ 'affects ("address_group", "address_scope", "bgpvpn" '
114119 '"security_group", "subnetpool", "qos_policy" or '
115120 '"network")' )
116121 )
@@ -203,11 +208,11 @@ def get_parser(self, prog_name):
203208 parser .add_argument (
204209 '--type' ,
205210 metavar = '<type>' ,
206- choices = ['address_group' , 'address_scope' , 'security_group ' ,
207- 'subnetpool' , 'qos_policy' , 'network' ],
211+ choices = ['address_group' , 'address_scope' , 'bgpvpn ' ,
212+ 'security_group' , ' subnetpool' , 'qos_policy' , 'network' ],
208213 help = _ ('List network RBAC policies according to '
209214 'given object type ("address_group", "address_scope", '
210- '"security_group", "subnetpool", "qos_policy" or '
215+ '"bgpvpn", " security_group", "subnetpool", "qos_policy" or '
211216 '"network")' )
212217 )
213218 parser .add_argument (
0 commit comments