Loading proto/context.proto +1 −1 Viewed Changes for proto/context.proto: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_XR = 6; DEVICEDRIVER_IETF_L2VPN = 7; DEVICEDRIVER_GNMI_OPENCONFIG = 8; DEVICEDRIVER_FLEXSCALE = 9; DEVICEDRIVER_OPTICAL_TFS = 9; DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; } Loading src/common/type_checkers/Assertions.py +1 −1 Viewed Changes for src/common/type_checkers/Assertions.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_XR', 'DEVICEDRIVER_IETF_L2VPN', 'DEVICEDRIVER_GNMI_OPENCONFIG', 'DEVICEDRIVER_FLEXSCALE', 'DEVICEDRIVER_OPTICAL_TFS', 'DEVICEDRIVER_IETF_ACTN', ] Loading src/context/service/database/models/enums/DeviceDriver.py +1 −1 Viewed Changes for src/context/service/database/models/enums/DeviceDriver.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class ORM_DeviceDriverEnum(enum.Enum): XR = DeviceDriverEnum.DEVICEDRIVER_XR IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG FLEXSCALE = DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE OPTICAL_TFS = DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC Loading src/device/service/drivers/ietf_l2vpn/TfsApiClient.py +3 −1 Viewed Changes for src/device/service/drivers/ietf_l2vpn/TfsApiClient.py: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -44,7 +44,9 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_XR' : 6, 'DEVICEDRIVER_IETF_L2VPN' : 7, 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, 'DEVICEDRIVER_FLEXSCALE' : 9, 'DEVICEDRIVER_OPTICAL_TFS' : 9, 'DEVICEDRIVER_IETF_ACTN' : 10, 'DEVICEDRIVER_OC' : 11, } MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' Loading src/device/service/drivers/flexscale/FlexScaleDriver.py→src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +10 −10 Viewed Changes for src/device/service/drivers/optical_tfs/OpticalTfsDriver.py: 10 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -26,11 +26,11 @@ from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get LOGGER = logging.getLogger(__name__) DRIVER_NAME = 'flexscale' DRIVER_NAME = 'optical_tfs' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) class FlexScaleDriver(_Driver): class OpticalTfsDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: super().__init__(DRIVER_NAME, address, port, **settings) self.__lock = threading.Lock() Loading @@ -41,7 +41,7 @@ class FlexScaleDriver(_Driver): self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None scheme = self.settings.get('scheme', 'http') self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) self.__flexscale_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) self.__base_url = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) self.__timeout = int(self.settings.get('timeout', 120)) # Options are: Loading @@ -54,7 +54,7 @@ class FlexScaleDriver(_Driver): def Connect(self) -> bool: url = self.__flexscale_root + '/OpticalTFS/GetLightpaths' url = self.__base_url + '/OpticalTFS/GetLightpaths' with self.__lock: if self.__started.is_set(): return True try: Loading Loading @@ -94,7 +94,7 @@ class FlexScaleDriver(_Driver): results.extend(self.tac.get_devices_endpoints(self.__import_topology)) # results.extend(get_lightpaths( # self.__flexscale_root, resource_key, timeout=self.__timeout, auth=self.__auth)) # self.__base_url, resource_key, timeout=self.__timeout, auth=self.__auth)) return results @metered_subclass_method(METRICS_POOL) Loading @@ -110,7 +110,7 @@ class FlexScaleDriver(_Driver): dst_node = find_key(resource, 'dst_node') bitrate = find_key(resource, 'bitrate') response = add_lightpath(self.__flexscale_root, src_node, dst_node, bitrate, response = add_lightpath(self.__base_url, src_node, dst_node, bitrate, auth=self.__auth, timeout=self.__timeout) results.extend(response) Loading @@ -129,23 +129,23 @@ class FlexScaleDriver(_Driver): dst_node = find_key(resource, 'dst_node') bitrate = find_key(resource, 'bitrate') response = del_lightpath(self.__flexscale_root, flow_id, src_node, dst_node, bitrate) response = del_lightpath(self.__base_url, flow_id, src_node, dst_node, bitrate) results.extend(response) return results @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return [False for _ in subscriptions] @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return [False for _ in subscriptions] def GetState( self, blocking=False, terminate : Optional[threading.Event] = None ) -> Iterator[Tuple[float, str, Any]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return [] Loading
proto/context.proto +1 −1 Viewed Changes for proto/context.proto: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_XR = 6; DEVICEDRIVER_IETF_L2VPN = 7; DEVICEDRIVER_GNMI_OPENCONFIG = 8; DEVICEDRIVER_FLEXSCALE = 9; DEVICEDRIVER_OPTICAL_TFS = 9; DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; } Loading
src/common/type_checkers/Assertions.py +1 −1 Viewed Changes for src/common/type_checkers/Assertions.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_XR', 'DEVICEDRIVER_IETF_L2VPN', 'DEVICEDRIVER_GNMI_OPENCONFIG', 'DEVICEDRIVER_FLEXSCALE', 'DEVICEDRIVER_OPTICAL_TFS', 'DEVICEDRIVER_IETF_ACTN', ] Loading
src/context/service/database/models/enums/DeviceDriver.py +1 −1 Viewed Changes for src/context/service/database/models/enums/DeviceDriver.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class ORM_DeviceDriverEnum(enum.Enum): XR = DeviceDriverEnum.DEVICEDRIVER_XR IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG FLEXSCALE = DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE OPTICAL_TFS = DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC Loading
src/device/service/drivers/ietf_l2vpn/TfsApiClient.py +3 −1 Viewed Changes for src/device/service/drivers/ietf_l2vpn/TfsApiClient.py: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -44,7 +44,9 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_XR' : 6, 'DEVICEDRIVER_IETF_L2VPN' : 7, 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, 'DEVICEDRIVER_FLEXSCALE' : 9, 'DEVICEDRIVER_OPTICAL_TFS' : 9, 'DEVICEDRIVER_IETF_ACTN' : 10, 'DEVICEDRIVER_OC' : 11, } MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' Loading
src/device/service/drivers/flexscale/FlexScaleDriver.py→src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +10 −10 Viewed Changes for src/device/service/drivers/optical_tfs/OpticalTfsDriver.py: 10 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -26,11 +26,11 @@ from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get LOGGER = logging.getLogger(__name__) DRIVER_NAME = 'flexscale' DRIVER_NAME = 'optical_tfs' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) class FlexScaleDriver(_Driver): class OpticalTfsDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: super().__init__(DRIVER_NAME, address, port, **settings) self.__lock = threading.Lock() Loading @@ -41,7 +41,7 @@ class FlexScaleDriver(_Driver): self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None scheme = self.settings.get('scheme', 'http') self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) self.__flexscale_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) self.__base_url = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) self.__timeout = int(self.settings.get('timeout', 120)) # Options are: Loading @@ -54,7 +54,7 @@ class FlexScaleDriver(_Driver): def Connect(self) -> bool: url = self.__flexscale_root + '/OpticalTFS/GetLightpaths' url = self.__base_url + '/OpticalTFS/GetLightpaths' with self.__lock: if self.__started.is_set(): return True try: Loading Loading @@ -94,7 +94,7 @@ class FlexScaleDriver(_Driver): results.extend(self.tac.get_devices_endpoints(self.__import_topology)) # results.extend(get_lightpaths( # self.__flexscale_root, resource_key, timeout=self.__timeout, auth=self.__auth)) # self.__base_url, resource_key, timeout=self.__timeout, auth=self.__auth)) return results @metered_subclass_method(METRICS_POOL) Loading @@ -110,7 +110,7 @@ class FlexScaleDriver(_Driver): dst_node = find_key(resource, 'dst_node') bitrate = find_key(resource, 'bitrate') response = add_lightpath(self.__flexscale_root, src_node, dst_node, bitrate, response = add_lightpath(self.__base_url, src_node, dst_node, bitrate, auth=self.__auth, timeout=self.__timeout) results.extend(response) Loading @@ -129,23 +129,23 @@ class FlexScaleDriver(_Driver): dst_node = find_key(resource, 'dst_node') bitrate = find_key(resource, 'bitrate') response = del_lightpath(self.__flexscale_root, flow_id, src_node, dst_node, bitrate) response = del_lightpath(self.__base_url, flow_id, src_node, dst_node, bitrate) results.extend(response) return results @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return [False for _ in subscriptions] @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return [False for _ in subscriptions] def GetState( self, blocking=False, terminate : Optional[threading.Event] = None ) -> Iterator[Tuple[float, str, Any]]: # FlexScale does not support monitoring by now # Optical TFS does not support monitoring by now return []