@@ -155,7 +155,7 @@ def update_parser_network(self, parser):
155155 "ipv6-encap, ipv6-frag, ipv6-icmp, ipv6-nonxt, "
156156 "ipv6-opts, ipv6-route, ospf, pgm, rsvp, sctp, tcp, "
157157 "udp, udplite, vrrp and integer representations [0-255] "
158- "or any; default: tcp )" )
158+ "or any; default: any (all protocols) )" )
159159 )
160160 protocol_group .add_argument (
161161 '--proto' ,
@@ -220,8 +220,8 @@ def update_parser_compute(self, parser):
220220 )
221221 return parser
222222
223- def _get_protocol (self , parsed_args ):
224- protocol = 'tcp'
223+ def _get_protocol (self , parsed_args , default_protocol = 'any' ):
224+ protocol = default_protocol
225225 if parsed_args .protocol is not None :
226226 protocol = parsed_args .protocol
227227 if parsed_args .proto is not None :
@@ -324,7 +324,7 @@ def take_action_network(self, client, parsed_args):
324324
325325 def take_action_compute (self , client , parsed_args ):
326326 group = client .api .security_group_find (parsed_args .group )
327- protocol = self ._get_protocol (parsed_args )
327+ protocol = self ._get_protocol (parsed_args , default_protocol = 'tcp' )
328328 if protocol == 'icmp' :
329329 from_port , to_port = - 1 , - 1
330330 else :
@@ -415,8 +415,8 @@ def update_parser_network(self, parser):
415415 "ah, dhcp, egp, esp, gre, icmp, igmp, "
416416 "ipv6-encap, ipv6-frag, ipv6-icmp, ipv6-nonxt, "
417417 "ipv6-opts, ipv6-route, ospf, pgm, rsvp, sctp, tcp, "
418- "udp, udplite, vrrp and integer representations [0-255]). "
419- )
418+ "udp, udplite, vrrp and integer representations [0-255] "
419+ "or any; default: any (all protocols))" )
420420 )
421421 direction_group = parser .add_mutually_exclusive_group ()
422422 direction_group .add_argument (
0 commit comments