def create_floating_ip(kwargs=None, call=None):
 if (call != 'function'):
  log.error('The create_floating_ip function must be called with -f or --function.')
  return False
 if (not kwargs):
  kwargs = {}
 if ('droplet_id' in kwargs):
  result = query(method='floating_ips', args={'droplet_id': kwargs['droplet_id']}, http_method='post')
  return result
 elif ('region' in kwargs):
  result = query(method='floating_ips', args={'region': kwargs['region']}, http_method='post')
  return result
 else:
  log.error('A droplet_id or region is required.')
  return False

def create_floating_ip ( kwargs = None , call = None ) : if ( call != 'function' ) : log . error ( 'The create_floating_ip function must be called with -f or --function.' ) return False if ( not kwargs ) : kwargs = { } if ( 'droplet_id' in kwargs ) : result = query ( method = 'floating_ips' , args = { 'droplet_id' : kwargs [ 'droplet_id' ] } , http_method = 'post' ) return result elif ( 'region' in kwargs ) : result = query ( method = 'floating_ips' , args = { 'region' : kwargs [ 'region' ] } , http_method = 'post' ) return result else : log . error ( 'A droplet_id or region is required.' ) return False
create a new floating ip .