@@ -159,8 +159,8 @@ def update_parser_network(self, parser):
159159 help = _ ("IP protocol (ah, dccp, egp, esp, gre, icmp, igmp, "
160160 "ipv6-encap, ipv6-frag, ipv6-icmp, ipv6-nonxt, "
161161 "ipv6-opts, ipv6-route, ospf, pgm, rsvp, sctp, tcp, "
162- "udp, udplite, vrrp and integer representations [0-255]; "
163- "default: tcp)" )
162+ "udp, udplite, vrrp and integer representations [0-255] "
163+ "or any; default: tcp)" )
164164 )
165165 protocol_group .add_argument (
166166 '--proto' ,
@@ -230,14 +230,16 @@ def _get_protocol(self, parsed_args):
230230 protocol = parsed_args .protocol
231231 if parsed_args .proto is not None :
232232 protocol = parsed_args .proto
233+ if protocol == 'any' :
234+ protocol = None
233235 return protocol
234236
235237 def _is_ipv6_protocol (self , protocol ):
236238 # NOTE(rtheis): Neutron has deprecated protocol icmpv6.
237239 # However, while the OSC CLI doesn't document the protocol,
238240 # the code must still handle it. In addition, handle both
239241 # protocol names and numbers.
240- if (protocol .startswith ('ipv6-' ) or
242+ if (protocol is not None and protocol .startswith ('ipv6-' ) or
241243 protocol in ['icmpv6' , '41' , '43' , '44' , '58' , '59' , '60' ]):
242244 return True
243245 else :
0 commit comments