Skip to content
Snippets Groups Projects
Commit f7806b29 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- Added logic to store in Context the explicit controller of a device
parent 222c46e1
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!199Resolve "(CTTC) Implement Service Handler for L3 services using ACTN SBI driver"
...@@ -73,6 +73,13 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): ...@@ -73,6 +73,13 @@ class DeviceServiceServicerImpl(DeviceServiceServicer):
device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED
device.device_drivers.extend(request.device_drivers) # pylint: disable=no-member device.device_drivers.extend(request.device_drivers) # pylint: disable=no-member
device.device_config.CopyFrom(request.device_config) # pylint: disable=no-member device.device_config.CopyFrom(request.device_config) # pylint: disable=no-member
if request.HasField('controller_id'):
controller_id = request.controller_id
if controller_id.HasField('device_uuid'):
controller_device_uuid = controller_id.device_uuid.uuid
device.controller_id.device_uuid.uuid = controller_device_uuid
device_id = context_client.SetDevice(device) device_id = context_client.SetDevice(device)
device = get_device(context_client, device_id.device_uuid.uuid, rw_copy=True) device = get_device(context_client, device_id.device_uuid.uuid, rw_copy=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment