def update_router_lport(cluster, lrouter_uuid, lrouter_port_uuid, tenant_id, quantum_port_id, display_name, admin_status_enabled, ip_addresses):
 lport_obj = dict(admin_status_enabled=admin_status_enabled, display_name=display_name, tags=[dict(scope='os_tid', tag=tenant_id), dict(scope='q_port_id', tag=quantum_port_id)], ip_addresses=ip_addresses, type='LogicalRouterPortConfig')
 for key in lport_obj.keys():
  if (lport_obj[key] is None):
   del lport_obj[key]
 path = _build_uri_path(LROUTERPORT_RESOURCE, lrouter_port_uuid, parent_resource_id=lrouter_uuid)
 try:
  resp_obj = do_single_request(HTTP_PUT, path, json.dumps(lport_obj), cluster=cluster)
 except NvpApiClient.ResourceNotFound as e:
  LOG.error(_('Logical router or router port not found, Error: %s'), str(e))
  raise
 result = json.loads(resp_obj)
 LOG.debug(_('Updated logical port %(lport_uuid)s on logical router %(lrouter_uuid)s'), {'lport_uuid': lrouter_port_uuid, 'lrouter_uuid': lrouter_uuid})
 return result

def update_router_lport ( cluster , lrouter_uuid , lrouter_port_uuid , tenant_id , quantum_port_id , display_name , admin_status_enabled , ip_addresses ) : lport_obj = dict ( admin_status_enabled = admin_status_enabled , display_name = display_name , tags = [ dict ( scope = 'os_tid' , tag = tenant_id ) , dict ( scope = 'q_port_id' , tag = quantum_port_id ) ] , ip_addresses = ip_addresses , type = 'LogicalRouterPortConfig' ) for key in lport_obj . keys ( ) : if ( lport_obj [ key ] is None ) : del lport_obj [ key ] path = _build_uri_path ( LROUTERPORT_RESOURCE , lrouter_port_uuid , parent_resource_id = lrouter_uuid ) try : resp_obj = do_single_request ( HTTP_PUT , path , json . dumps ( lport_obj ) , cluster = cluster ) except NvpApiClient . ResourceNotFound as e : LOG . error ( _ ( 'Logical router or router port not found, Error: %s' ) , str ( e ) ) raise result = json . loads ( resp_obj ) LOG . debug ( _ ( 'Updated logical port %(lport_uuid)s on logical router %(lrouter_uuid)s' ) , { 'lport_uuid' : lrouter_port_uuid , 'lrouter_uuid' : lrouter_uuid } ) return result
updates a logical port on the assigned logical router .