def assign_floating_ip(kwargs=None, call=None):
 if (call != 'function'):
  log.error('The assign_floating_ip function must be called with -f or --function.')
  return False
 if (not kwargs):
  kwargs = {}
 if ('floating_ip' and ('droplet_id' not in kwargs)):
  log.error('A floating IP and droplet_id is required.')
  return False
 result = query(method='floating_ips', command=(kwargs['floating_ip'] + '/actions'), args={'droplet_id': kwargs['droplet_id'], 'type': 'assign'}, http_method='post')
 return result

def assign_floating_ip ( kwargs = None , call = None ) : if ( call != 'function' ) : log . error ( 'The assign_floating_ip function must be called with -f or --function.' ) return False if ( not kwargs ) : kwargs = { } if ( 'floating_ip' and ( 'droplet_id' not in kwargs ) ) : log . error ( 'A floating IP and droplet_id is required.' ) return False result = query ( method = 'floating_ips' , command = ( kwargs [ 'floating_ip' ] + '/actions' ) , args = { 'droplet_id' : kwargs [ 'droplet_id' ] , 'type' : 'assign' } , http_method = 'post' ) return result
assign a floating ip .