def vn_free_ar(call=None, kwargs=None):
 if (call != 'function'):
  raise SaltCloudSystemExit('The vn_free_ar function must be called with -f or --function.')
 if (kwargs is None):
  kwargs = {}
 vn_id = kwargs.get('vn_id', None)
 vn_name = kwargs.get('vn_name', None)
 ar_id = kwargs.get('ar_id', None)
 if (ar_id is None):
  raise SaltCloudSystemExit("The vn_free_ar function requires an 'rn_id' to be provided.")
 if vn_id:
  if vn_name:
   log.warning("Both the 'vn_id' and 'vn_name' arguments were provided. 'vn_id' will take precedence.")
 elif vn_name:
  vn_id = get_vn_id(kwargs={'name': vn_name})
 else:
  raise SaltCloudSystemExit("The vn_free_ar function requires a 'vn_id' or a 'vn_name' to be provided.")
 (server, user, password) = _get_xml_rpc()
 auth = ':'.join([user, password])
 response = server.one.vn.free_ar(auth, int(vn_id), int(ar_id))
 data = {'action': 'vn.free_ar', 'ar_freed': response[0], 'resource_id': response[1], 'error_code': response[2]}
 return data

def vn_free_ar ( call = None , kwargs = None ) : if ( call != 'function' ) : raise SaltCloudSystemExit ( 'The vn_free_ar function must be called with -f or --function.' ) if ( kwargs is None ) : kwargs = { } vn_id = kwargs . get ( 'vn_id' , None ) vn_name = kwargs . get ( 'vn_name' , None ) ar_id = kwargs . get ( 'ar_id' , None ) if ( ar_id is None ) : raise SaltCloudSystemExit ( "The vn_free_ar function requires an 'rn_id' to be provided." ) if vn_id : if vn_name : log . warning ( "Both the 'vn_id' and 'vn_name' arguments were provided. 'vn_id' will take precedence." ) elif vn_name : vn_id = get_vn_id ( kwargs = { 'name' : vn_name } ) else : raise SaltCloudSystemExit ( "The vn_free_ar function requires a 'vn_id' or a 'vn_name' to be provided." ) ( server , user , password ) = _get_xml_rpc ( ) auth = ':' . join ( [ user , password ] ) response = server . one . vn . free_ar ( auth , int ( vn_id ) , int ( ar_id ) ) data = { 'action' : 'vn.free_ar' , 'ar_freed' : response [ 0 ] , 'resource_id' : response [ 1 ] , 'error_code' : response [ 2 ] } return data
frees a reserved address range from a virtual network .