Loading src/common/tools/object_factory/Service.py +10 −0 Viewed Changes for src/common/tools/object_factory/Service.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -42,6 +42,16 @@ def json_service( 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } def json_service_qkd_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME ): return json_service( service_uuid, ServiceTypeEnum.SERVICETYPE_QKD, context_id=json_context_id(context_uuid), status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) def json_service_l2nm_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME Loading src/device/tests/qkd/unit/test_qkd_mock_connectivity.py +1 −0 Viewed Changes for src/device/tests/qkd/unit/test_qkd_mock_connectivity.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,3 +38,4 @@ def test_qkd_driver_timeout_connection(mock_get, qkd_driver): mock_get.side_effect = requests.exceptions.Timeout qkd_driver.timeout = 0.001 # Simulate very short timeout assert qkd_driver.Connect() is False src/service/service/service_handlers/qkd/qkd_service_handler.py +1 −1 Viewed Changes for src/service/service/service_handlers/qkd/qkd_service_handler.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ import json, logging, uuid from typing import Any, Dict, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigRule, DeviceId, Service from common.proto.app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum from common.proto.qkd_app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type Loading src/webui/service/device/forms.py +2 −0 Viewed Changes for src/webui/service/device/forms.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class AddDeviceForm(FlaskForm): device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') device_drivers_optical_tfs = BooleanField('OPTICAL TFS') device_drivers_ietf_actn = BooleanField('IETF ACTN') device_drivers_qkd = BooleanField('QKD') device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) Loading @@ -57,3 +58,4 @@ class UpdateDeviceForm(FlaskForm): validators=[NumberRange(min=0)]) submit = SubmitField('Update') src/webui/service/device/routes.py +2 −0 Viewed Changes for src/webui/service/device/routes.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -129,6 +129,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS) if form.device_drivers_ietf_actn.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN) if form.device_drivers_qkd.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_QKD) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: Loading Loading
src/common/tools/object_factory/Service.py +10 −0 Viewed Changes for src/common/tools/object_factory/Service.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -42,6 +42,16 @@ def json_service( 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } def json_service_qkd_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME ): return json_service( service_uuid, ServiceTypeEnum.SERVICETYPE_QKD, context_id=json_context_id(context_uuid), status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) def json_service_l2nm_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME Loading
src/device/tests/qkd/unit/test_qkd_mock_connectivity.py +1 −0 Viewed Changes for src/device/tests/qkd/unit/test_qkd_mock_connectivity.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,3 +38,4 @@ def test_qkd_driver_timeout_connection(mock_get, qkd_driver): mock_get.side_effect = requests.exceptions.Timeout qkd_driver.timeout = 0.001 # Simulate very short timeout assert qkd_driver.Connect() is False
src/service/service/service_handlers/qkd/qkd_service_handler.py +1 −1 Viewed Changes for src/service/service/service_handlers/qkd/qkd_service_handler.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ import json, logging, uuid from typing import Any, Dict, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigRule, DeviceId, Service from common.proto.app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum from common.proto.qkd_app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type Loading
src/webui/service/device/forms.py +2 −0 Viewed Changes for src/webui/service/device/forms.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class AddDeviceForm(FlaskForm): device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') device_drivers_optical_tfs = BooleanField('OPTICAL TFS') device_drivers_ietf_actn = BooleanField('IETF ACTN') device_drivers_qkd = BooleanField('QKD') device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) Loading @@ -57,3 +58,4 @@ class UpdateDeviceForm(FlaskForm): validators=[NumberRange(min=0)]) submit = SubmitField('Update')
src/webui/service/device/routes.py +2 −0 Viewed Changes for src/webui/service/device/routes.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -129,6 +129,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS) if form.device_drivers_ietf_actn.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN) if form.device_drivers_qkd.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_QKD) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: Loading