def list_security_rules(call=None, kwargs=None):
 global netconn
 if (not netconn):
  netconn = get_conn(NetworkManagementClient)
 if (kwargs is None):
  kwargs = {}
 if (kwargs.get('resource_group') is None):
  kwargs['resource_group'] = config.get_cloud_config_value('resource_group', {}, __opts__, search_global=True)
 if (kwargs.get('security_group') is None):
  kwargs['security_group'] = config.get_cloud_config_value('security_group', {}, __opts__, search_global=True)
 region = get_location()
 bank = 'cloud/metadata/azurearm/{0}'.format(region)
 security_rules = cache.cache(bank, 'security_rules', netconn.security_rules.list, loop_fun=make_safe, expire=config.get_cloud_config_value('expire_security_rule_cache', get_configured_provider(), __opts__, search_global=False, default=86400), resource_group_name=kwargs['resource_group'], network_security_group_name=kwargs['security_group'])
 ret = {}
 for group in security_rules:
  ret[group['name']] = group
 return ret

def list_security_rules ( call = None , kwargs = None ) : global netconn if ( not netconn ) : netconn = get_conn ( NetworkManagementClient ) if ( kwargs is None ) : kwargs = { } if ( kwargs . get ( 'resource_group' ) is None ) : kwargs [ 'resource_group' ] = config . get_cloud_config_value ( 'resource_group' , { } , __opts__ , search_global = True ) if ( kwargs . get ( 'security_group' ) is None ) : kwargs [ 'security_group' ] = config . get_cloud_config_value ( 'security_group' , { } , __opts__ , search_global = True ) region = get_location ( ) bank = 'cloud/metadata/azurearm/{0}' . format ( region ) security_rules = cache . cache ( bank , 'security_rules' , netconn . security_rules . list , loop_fun = make_safe , expire = config . get_cloud_config_value ( 'expire_security_rule_cache' , get_configured_provider ( ) , __opts__ , search_global = False , default = 86400 ) , resource_group_name = kwargs [ 'resource_group' ] , network_security_group_name = kwargs [ 'security_group' ] ) ret = { } for group in security_rules : ret [ group [ 'name' ] ] = group return ret
lits network security rules .