Loading src/device/service/OpenConfigServicer.py +4 −2 Original line number Diff line number Diff line Loading @@ -86,9 +86,10 @@ class OpenConfigServicer(DeviceServiceServicer): device = get_device( context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, include_config_rules=False) LOGGER.info(f"device is {device}") if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') LOGGER.info(f"device is {device.name}") resources,conditions=extract_resources(config=config,device=device) LOGGER.info(f"from openconfigservicer {resources} and conditions {conditions}") driver : _Driver = get_driver(self.driver_instance_cache, device) Loading Loading @@ -169,9 +170,10 @@ class OpenConfigServicer(DeviceServiceServicer): device = get_device( context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, include_config_rules=False) LOGGER.info(f"device is {device}") if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') LOGGER.info(f"device is {device.name}") resources,conditions=extract_resources(config=config,device=device) LOGGER.info(f" Disable resources from openconfigservicer {resources} and conditions {conditions}") driver : _Driver = get_driver(self.driver_instance_cache, device) Loading src/device/service/drivers/oc_driver/templates/VPN/roadms.py +38 −37 Original line number Diff line number Diff line Loading @@ -240,14 +240,15 @@ def create_optical_band (resources) : unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent','handled_flow'] config,ports,index= filter_config(resources,unwanted_keys=unwanted_keys) logging.info(f"SSSSSSSSSSSSSSS {ports}") doc, tag, text = Doc().tagtext() #with tag('config'): n = 0 for flow in ports: doc, tag, text = Doc().tagtext() with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): n = 0 for flow in ports: #with tag('optical-band', operation="create"): src,dest=flow logging.info(f"SSSSSSSSSSSSSSS {src}, {dest}") Loading Loading
src/device/service/OpenConfigServicer.py +4 −2 Original line number Diff line number Diff line Loading @@ -86,9 +86,10 @@ class OpenConfigServicer(DeviceServiceServicer): device = get_device( context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, include_config_rules=False) LOGGER.info(f"device is {device}") if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') LOGGER.info(f"device is {device.name}") resources,conditions=extract_resources(config=config,device=device) LOGGER.info(f"from openconfigservicer {resources} and conditions {conditions}") driver : _Driver = get_driver(self.driver_instance_cache, device) Loading Loading @@ -169,9 +170,10 @@ class OpenConfigServicer(DeviceServiceServicer): device = get_device( context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, include_config_rules=False) LOGGER.info(f"device is {device}") if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') LOGGER.info(f"device is {device.name}") resources,conditions=extract_resources(config=config,device=device) LOGGER.info(f" Disable resources from openconfigservicer {resources} and conditions {conditions}") driver : _Driver = get_driver(self.driver_instance_cache, device) Loading
src/device/service/drivers/oc_driver/templates/VPN/roadms.py +38 −37 Original line number Diff line number Diff line Loading @@ -240,14 +240,15 @@ def create_optical_band (resources) : unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent','handled_flow'] config,ports,index= filter_config(resources,unwanted_keys=unwanted_keys) logging.info(f"SSSSSSSSSSSSSSS {ports}") doc, tag, text = Doc().tagtext() #with tag('config'): n = 0 for flow in ports: doc, tag, text = Doc().tagtext() with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): n = 0 for flow in ports: #with tag('optical-band', operation="create"): src,dest=flow logging.info(f"SSSSSSSSSSSSSSS {src}, {dest}") Loading