def list_securitygroup(call=None):
 if (call == 'action'):
  raise SaltCloudSystemExit('The list_nodes function must be called with -f or --function.')
 params = {'Action': 'DescribeSecurityGroups', 'RegionId': get_location()}
 result = query(params)
 if ('Code' in result):
  return {}
 ret = {}
 for sg in result['SecurityGroups']['SecurityGroup']:
  ret[sg['SecurityGroupId']] = {}
  for item in sg:
   ret[sg['SecurityGroupId']][item] = sg[item]
 return ret

def list_securitygroup ( call = None ) : if ( call == 'action' ) : raise SaltCloudSystemExit ( 'The list_nodes function must be called with -f or --function.' ) params = { 'Action' : 'DescribeSecurityGroups' , 'RegionId' : get_location ( ) } result = query ( params ) if ( 'Code' in result ) : return { } ret = { } for sg in result [ 'SecurityGroups' ] [ 'SecurityGroup' ] : ret [ sg [ 'SecurityGroupId' ] ] = { } for item in sg : ret [ sg [ 'SecurityGroupId' ] ] [ item ] = sg [ item ] return ret
return a list of security group .