def list_security_groups(call=None):
 if (call == 'action'):
  raise SaltCloudSystemExit('The list_security_groups function must be called with -f or --function.')
 (server, user, password) = _get_xml_rpc()
 auth = ':'.join([user, password])
 secgroup_pool = server.one.secgrouppool.info(auth, (-2), (-1), (-1))[1]
 groups = {}
 for group in _get_xml(secgroup_pool):
  groups[group.find('NAME').text] = _xml_to_dict(group)
 return groups

def list_security_groups ( call = None ) : if ( call == 'action' ) : raise SaltCloudSystemExit ( 'The list_security_groups function must be called with -f or --function.' ) ( server , user , password ) = _get_xml_rpc ( ) auth = ':' . join ( [ user , password ] ) secgroup_pool = server . one . secgrouppool . info ( auth , ( - 2 ) , ( - 1 ) , ( - 1 ) ) [ 1 ] groups = { } for group in _get_xml ( secgroup_pool ) : groups [ group . find ( 'NAME' ) . text ] = _xml_to_dict ( group ) return groups
fetches a list of all security groups for a tenant cli example: .