@utils.arg('ip_proto', metavar='<ip-proto>', help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg('from_port', metavar='<from-port>', help=_('Port at start of range.'))
@utils.arg('to_port', metavar='<to-port>', help=_('Port at end of range.'))
@utils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
@deprecated_network
def do_secgroup_delete_default_rule(cs, args):
 for rule in cs.security_group_default_rules.list():
  if (rule.ip_protocol and (rule.ip_protocol.upper() == args.ip_proto.upper()) and (rule.from_port == int(args.from_port)) and (rule.to_port == int(args.to_port)) and (rule.ip_range['cidr'] == args.cidr)):
   _print_secgroup_rules([rule], show_source_group=False)
   return cs.security_group_default_rules.delete(rule.id)
 raise exceptions.CommandError(_('Rule not found'))

@ utils . arg ( 'ip_proto' , metavar = '<ip-proto>' , help = _ ( 'IP protocol (icmp, tcp, udp).' ) ) @ utils . arg ( 'from_port' , metavar = '<from-port>' , help = _ ( 'Port at start of range.' ) ) @ utils . arg ( 'to_port' , metavar = '<to-port>' , help = _ ( 'Port at end of range.' ) ) @ utils . arg ( 'cidr' , metavar = '<cidr>' , help = _ ( 'CIDR for address range.' ) ) @ deprecated_network def do_secgroup_delete_default_rule ( cs , args ) : for rule in cs . security_group_default_rules . list ( ) : if ( rule . ip_protocol and ( rule . ip_protocol . upper ( ) == args . ip_proto . upper ( ) ) and ( rule . from_port == int ( args . from_port ) ) and ( rule . to_port == int ( args . to_port ) ) and ( rule . ip_range [ 'cidr' ] == args . cidr ) ) : _print_secgroup_rules ( [ rule ] , show_source_group = False ) return cs . security_group_default_rules . delete ( rule . id ) raise exceptions . CommandError ( _ ( 'Rule not found' ) )
delete a rule from the set of rules that will be added to the default security group for new tenants .