@utils.arg('--all-tenants', dest='all_tenants', metavar='<0|1>', nargs='?', type=int, const=1, default=int(strutils.bool_from_string(os.environ.get('ALL_TENANTS', 'false'), True)), help=_('Display information from all tenants (Admin only).'))
@deprecated_network
def do_secgroup_list(cs, args):
 search_opts = {'all_tenants': args.all_tenants}
 columns = ['Id', 'Name', 'Description']
 if args.all_tenants:
  columns.append('Tenant_ID')
 groups = cs.security_groups.list(search_opts=search_opts)
 utils.print_list(groups, columns)

@ utils . arg ( '--all-tenants' , dest = 'all_tenants' , metavar = '<0|1>' , nargs = '?' , type = int , const = 1 , default = int ( strutils . bool_from_string ( os . environ . get ( 'ALL_TENANTS' , 'false' ) , True ) ) , help = _ ( 'Display information from all tenants (Admin only).' ) ) @ deprecated_network def do_secgroup_list ( cs , args ) : search_opts = { 'all_tenants' : args . all_tenants } columns = [ 'Id' , 'Name' , 'Description' ] if args . all_tenants : columns . append ( 'Tenant_ID' ) groups = cs . security_groups . list ( search_opts = search_opts ) utils . print_list ( groups , columns )
list security groups for the current tenant .