def get_port_from_device(cls, device): port = db_api_v2.get_port_from_device(device) if port: port['device'] = device return port