diff --git a/hackfest/containerlab/commands.txt b/hackfest/containerlab/commands.txt index 18c629c0af2fe176a34f9b08a16405731c185243..df5fbc0ce0163f4ce06b862e90e29854dbae204a 100644 --- a/hackfest/containerlab/commands.txt +++ b/hackfest/containerlab/commands.txt @@ -60,22 +60,24 @@ docker exec -it clab-tfs-scenario-client2 bash $ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" ## gNMI Capabilities request -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities ## gNMI Get request -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interface[name=mgmt0] +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/config/hostname +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interfaces/interface[name=mgmt0] + ## gNMI Set request -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/name/host-name --update-value slr11 +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/config/hostname --update-value srl11 -(we check the changed value) -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name +(we check the changed value) +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/config/hostname ## Subscribe request -$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interface[name=mgmt0]/statistics +$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interfaces/interface[name=mgmt0]/state/ + (In another terminal, you can generate traffic) -$ssh admin@clab-srlinux-srl1 +$ssh admin@clab-tfs-scenario-srl1 diff --git a/proto/context.proto b/proto/context.proto index 30fbe01c53815d011f2fc65b0508459b561fb678..22e11bc68b840115a19551958ac322acb71fb9a4 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -197,7 +197,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_TRANSPORT_API = 2; DEVICEDRIVER_P4 = 3; DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - DEVICEDRIVER_ONF_TR_352 = 5; + DEVICEDRIVER_ONF_TR_532 = 5; DEVICEDRIVER_XR = 6; DEVICEDRIVER_IETF_L2VPN = 7; DEVICEDRIVER_GNMI_OPENCONFIG = 8; diff --git a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java b/src/automation/src/main/java/eu/teraflow/automation/Serializer.java index b0729aa55b25da030f9722330e22a0976a3d007f..3d5c93b2c60da6872bca019936eba5524191ad12 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java +++ b/src/automation/src/main/java/eu/teraflow/automation/Serializer.java @@ -849,8 +849,8 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_P4; case IETF_NETWORK_TOPOLOGY: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case ONF_TR_352: - return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352; + case ONF_TR_532: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532; case XR: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; case IETF_L2VPN: @@ -872,8 +872,8 @@ public class Serializer { return DeviceDriverEnum.P4; case DEVICEDRIVER_IETF_NETWORK_TOPOLOGY: return DeviceDriverEnum.IETF_NETWORK_TOPOLOGY; - case DEVICEDRIVER_ONF_TR_352: - return DeviceDriverEnum.ONF_TR_352; + case DEVICEDRIVER_ONF_TR_532: + return DeviceDriverEnum.ONF_TR_532; case DEVICEDRIVER_XR: return DeviceDriverEnum.XR; case DEVICEDRIVER_IETF_L2VPN: diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java b/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java index 3a26937e79d0df2cfead305a10ccadf3c54eae89..c1e1491c93a6aaa8b094b1e65a556c3908a08dc0 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java +++ b/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java @@ -22,7 +22,7 @@ public enum DeviceDriverEnum { TRANSPORT_API, P4, IETF_NETWORK_TOPOLOGY, - ONF_TR_352, + ONF_TR_532, XR, IETF_L2VPN } diff --git a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java b/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java index d2257d1b34e4753aff620e9bbc15d941f99ae3ba..7351d16a90db438bad4535fd3d413c5c48e91b17 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java +++ b/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java @@ -1212,8 +1212,8 @@ class SerializerTest { DeviceDriverEnum.IETF_NETWORK_TOPOLOGY, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY), Arguments.of( - DeviceDriverEnum.ONF_TR_352, - ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352), + DeviceDriverEnum.ONF_TR_532, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532), Arguments.of(DeviceDriverEnum.XR, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR), Arguments.of( DeviceDriverEnum.IETF_L2VPN, diff --git a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java index a605e30de68ae66866a78d53863412937ceea890..be75963507751fbf5a8a1c92101de4023fd50e63 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java @@ -170,9 +170,9 @@ public final class ContextOuterClass { */ DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), /** - * <code>DEVICEDRIVER_ONF_TR_352 = 5;</code> + * <code>DEVICEDRIVER_ONF_TR_532 = 5;</code> */ - DEVICEDRIVER_ONF_TR_352(5), + DEVICEDRIVER_ONF_TR_532(5), /** * <code>DEVICEDRIVER_XR = 6;</code> */ @@ -213,9 +213,9 @@ public final class ContextOuterClass { */ public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; /** - * <code>DEVICEDRIVER_ONF_TR_352 = 5;</code> + * <code>DEVICEDRIVER_ONF_TR_532 = 5;</code> */ - public static final int DEVICEDRIVER_ONF_TR_352_VALUE = 5; + public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; /** * <code>DEVICEDRIVER_XR = 6;</code> */ @@ -259,7 +259,7 @@ public final class ContextOuterClass { case 2: return DEVICEDRIVER_TRANSPORT_API; case 3: return DEVICEDRIVER_P4; case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case 5: return DEVICEDRIVER_ONF_TR_352; + case 5: return DEVICEDRIVER_ONF_TR_532; case 6: return DEVICEDRIVER_XR; case 7: return DEVICEDRIVER_IETF_L2VPN; case 8: return DEVICEDRIVER_GNMI_OPENCONFIG; @@ -74215,7 +74215,7 @@ public final class ContextOuterClass { "RIVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANS" + "PORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVIC" + "EDRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVIC" + - "EDRIVER_ONF_TR_352\020\005\022\023\n\017DEVICEDRIVER_XR\020" + + "EDRIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020" + "\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICE" + "DRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033DeviceOpera" + "tionalStatusEnum\022%\n!DEVICEOPERATIONALSTA" + diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index 25eb42fabf9c670256e9079a060aa38deb3c0f3d..42ea864f3c0c1150c3806f97e67ff3969542ab70 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -31,7 +31,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_TRANSPORT_API', 'DEVICEDRIVER_P4', 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY', - 'DEVICEDRIVER_ONF_TR_352', + 'DEVICEDRIVER_ONF_TR_532', 'DEVICEDRIVER_XR', 'DEVICEDRIVER_IETF_L2VPN', 'DEVICEDRIVER_GNMI_OPENCONFIG', diff --git a/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py b/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py index ffdbba88f077f6490261372f7048b2e2526d8196..5573b7b026b18715f31a91a052c1a5b15c97a5f0 100644 --- a/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py +++ b/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py @@ -12,17 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask_restful import Resource +from flask_restful import Resource, request from common.proto.context_pb2 import Empty from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient from .Tools import ( format_grpc_to_json, grpc_connection_id, grpc_context_id, grpc_device_id, grpc_link_id, grpc_policy_rule_id, - grpc_service_id, grpc_slice_id, grpc_topology_id) + grpc_service_id, grpc_service, grpc_slice_id, grpc_topology_id) class _Resource(Resource): def __init__(self) -> None: super().__init__() self.client = ContextClient() + self.service_client = ServiceClient() class ContextIds(_Resource): def get(self): @@ -60,6 +62,31 @@ class Service(_Resource): def get(self, context_uuid : str, service_uuid : str): return format_grpc_to_json(self.client.GetService(grpc_service_id(context_uuid, service_uuid))) + def post(self, context_uuid : str, service_uuid : str): + service = request.get_json()['services'][0] + return format_grpc_to_json(self.service_client.CreateService(grpc_service( + service_uuid = service['service_id']['service_uuid']['uuid'], + service_type = service['service_type'], + context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], + ))) + + def put(self, context_uuid : str, service_uuid : str): + service = request.get_json()['services'][0] + return format_grpc_to_json(self.service_client.UpdateService(grpc_service( + service_uuid = service['service_id']['service_uuid']['uuid'], + service_type = service['service_type'], + context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], + status = service['service_status']['service_status'], + endpoint_ids = service['service_endpoint_ids'], + constraints = service['service_constraints'], + config_rules = service['service_config']['config_rules'] + ))) + + def delete(self, context_uuid : str, service_uuid : str): + return format_grpc_to_json(self.service_client.DeleteService(grpc_service_id( + context_uuid, service_uuid, + ))) + class SliceIds(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.client.ListSliceIds(grpc_context_id(context_uuid))) diff --git a/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py b/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py index f3dff545ba9812ff3f4e13c3da53774af7626014..fd5eb2316d44f4f13e6d8bedef7411beee80c46a 100644 --- a/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py +++ b/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py @@ -13,15 +13,20 @@ # limitations under the License. from flask.json import jsonify -from common.proto.context_pb2 import ConnectionId, ContextId, DeviceId, LinkId, ServiceId, SliceId, TopologyId +from common.proto.context_pb2 import ( + ConnectionId, ContextId, DeviceId, LinkId, ServiceId, SliceId, TopologyId, Service, ServiceStatusEnum +) from common.proto.policy_pb2 import PolicyRuleId from common.tools.grpc.Tools import grpc_message_to_json from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.ConfigRule import json_config_rule +from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.EndPoint import json_endpoint_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Link import json_link_id from common.tools.object_factory.PolicyRule import json_policyrule_id -from common.tools.object_factory.Service import json_service_id +from common.tools.object_factory.Service import json_service_id, json_service from common.tools.object_factory.Slice import json_slice_id from common.tools.object_factory.Topology import json_topology_id @@ -44,6 +49,37 @@ def grpc_link_id(link_uuid): def grpc_service_id(context_uuid, service_uuid): return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) +def grpc_service( + service_uuid, service_type, context_uuid, status=None, endpoint_ids=None, constraints=None, config_rules=None +): + json_context = json_context_id(context_uuid) + json_status = status if status else ServiceStatusEnum.SERVICESTATUS_PLANNED + json_endpoints_ids = [ + json_endpoint_id( + json_device_id(endpoint_id['device_id']['device_uuid']['uuid']), + endpoint_id['endpoint_uuid']['uuid'] + ) + for endpoint_id in endpoint_ids + ] if endpoint_ids else [] + json_constraints = [ + json_constraint_custom( + constraint['custom']['constraint_type'], + constraint['custom']['constraint_value'] + ) + for constraint in constraints + ] if constraints else [] + json_config_rules = [ + json_config_rule( + config_rule['action'], + config_rule['custom']['resource_key'], + config_rule['custom']['resource_value'] + ) + for config_rule in config_rules + ] if config_rules else [] + return Service(**json_service( + service_uuid, service_type, json_context, json_status, + json_endpoints_ids, json_constraints, json_config_rules)) + def grpc_slice_id(context_uuid, slice_uuid): return SliceId(**json_slice_id(slice_uuid, context_id=json_context_id(context_uuid))) diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 09be94b1d7ec041f2d3f50f832f15017fb62e63c..0ed68d23b9ba04c7f12d3d4d0d378cbbfc9a879a 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -22,7 +22,7 @@ class ORM_DeviceDriverEnum(enum.Enum): TRANSPORT_API = DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API P4 = DeviceDriverEnum.DEVICEDRIVER_P4 IETF_NETWORK_TOPOLOGY = DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY - ONF_TR_352 = DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352 + ONF_TR_532 = DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532 XR = DeviceDriverEnum.DEVICEDRIVER_XR IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 4ae7128b0258536dae5fbed2ae86457d4f9f969f..0d85e8ff9668c5715dfc9d830027a5ae1faed9b5 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -69,7 +69,7 @@ DRIVERS.append( # DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API, # DeviceDriverEnum.DEVICEDRIVER_P4, # DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, - # DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352, + # DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532, # DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, # ], #} diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py index 19adc31c30e27f141c7c4dac50b1dcc4c047b1cf..2d3901695abc4c0124a7f443ffa59f825d4e13bf 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py @@ -40,7 +40,7 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_TRANSPORT_API' : 2, 'DEVICEDRIVER_P4' : 3, 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY': 4, - 'DEVICEDRIVER_ONF_TR_352' : 5, + 'DEVICEDRIVER_ONF_TR_532' : 5, 'DEVICEDRIVER_XR' : 6, 'DEVICEDRIVER_IETF_L2VPN' : 7, 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, diff --git a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java index 5a95f0e6edd200251a27b1e3571b719ebd102e1b..e7fb00029f15d82dbe80c8fff13d098ca5b29f30 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java +++ b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java @@ -2270,8 +2270,8 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_P4; case IETF_NETWORK_TOPOLOGY: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case ONF_TR_352: - return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352; + case ONF_TR_532: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532; case XR: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; case IETF_L2VPN: @@ -2293,8 +2293,8 @@ public class Serializer { return DeviceDriverEnum.P4; case DEVICEDRIVER_IETF_NETWORK_TOPOLOGY: return DeviceDriverEnum.IETF_NETWORK_TOPOLOGY; - case DEVICEDRIVER_ONF_TR_352: - return DeviceDriverEnum.ONF_TR_352; + case DEVICEDRIVER_ONF_TR_532: + return DeviceDriverEnum.ONF_TR_532; case DEVICEDRIVER_XR: return DeviceDriverEnum.XR; case DEVICEDRIVER_IETF_L2VPN: diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java b/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java index ad763e35dfeef71c2f9f73dbf51785a3e03c0e0d..e4198b9d03a4afcaef71a6311a244072ded2eab0 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java +++ b/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java @@ -22,7 +22,7 @@ public enum DeviceDriverEnum { TRANSPORT_API, P4, IETF_NETWORK_TOPOLOGY, - ONF_TR_352, + ONF_TR_532, XR, IETF_L2VPN } diff --git a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java b/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java index 32055a1820365ffc0f048fa70e99df5f3369fd81..fb60ef8d1a82417f858fe63845b76b27099f488e 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java +++ b/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java @@ -3602,8 +3602,8 @@ class SerializerTest { DeviceDriverEnum.IETF_NETWORK_TOPOLOGY, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY), Arguments.of( - DeviceDriverEnum.ONF_TR_352, - ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352), + DeviceDriverEnum.ONF_TR_532, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532), Arguments.of(DeviceDriverEnum.XR, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR), Arguments.of( DeviceDriverEnum.IETF_L2VPN, diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index a605e30de68ae66866a78d53863412937ceea890..be75963507751fbf5a8a1c92101de4023fd50e63 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -170,9 +170,9 @@ public final class ContextOuterClass { */ DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), /** - * <code>DEVICEDRIVER_ONF_TR_352 = 5;</code> + * <code>DEVICEDRIVER_ONF_TR_532 = 5;</code> */ - DEVICEDRIVER_ONF_TR_352(5), + DEVICEDRIVER_ONF_TR_532(5), /** * <code>DEVICEDRIVER_XR = 6;</code> */ @@ -213,9 +213,9 @@ public final class ContextOuterClass { */ public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; /** - * <code>DEVICEDRIVER_ONF_TR_352 = 5;</code> + * <code>DEVICEDRIVER_ONF_TR_532 = 5;</code> */ - public static final int DEVICEDRIVER_ONF_TR_352_VALUE = 5; + public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; /** * <code>DEVICEDRIVER_XR = 6;</code> */ @@ -259,7 +259,7 @@ public final class ContextOuterClass { case 2: return DEVICEDRIVER_TRANSPORT_API; case 3: return DEVICEDRIVER_P4; case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case 5: return DEVICEDRIVER_ONF_TR_352; + case 5: return DEVICEDRIVER_ONF_TR_532; case 6: return DEVICEDRIVER_XR; case 7: return DEVICEDRIVER_IETF_L2VPN; case 8: return DEVICEDRIVER_GNMI_OPENCONFIG; @@ -74215,7 +74215,7 @@ public final class ContextOuterClass { "RIVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANS" + "PORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVIC" + "EDRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVIC" + - "EDRIVER_ONF_TR_352\020\005\022\023\n\017DEVICEDRIVER_XR\020" + + "EDRIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020" + "\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICE" + "DRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033DeviceOpera" + "tionalStatusEnum\022%\n!DEVICEOPERATIONALSTA" + diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 1b22c5c42e908e9b9455358edd2abf54442628f5..430e25938601d522187046b0ebd4cad6971261bb 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -33,7 +33,7 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API, DeviceDriverEnum.DEVICEDRIVER_P4, DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, - DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352, + DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532, DeviceDriverEnum.DEVICEDRIVER_XR, DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN, DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 7ea0d4f627b5d6010f6e40135f6005471efe8d71..cb926e5b767ae56ea2024aad7cb9afa632f9d6bb 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -71,7 +71,7 @@ SERVICE_HANDLERS = [ (MicrowaveServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, - FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352], + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532], } ]), (P4ServiceHandler, [ diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index e884e96a511ab90625bda257075c80adce4406cd..bcd5804d32927763344d08371320fdde5f2fcab7 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -27,7 +27,7 @@ class AddDeviceForm(FlaskForm): device_drivers_transport_api = BooleanField('TRANSPORT_API') device_drivers_p4 = BooleanField('P4') device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY') - device_drivers_onf_tr_352 = BooleanField('ONF_TR_352') + device_drivers_onf_tr_532 = BooleanField('ONF_TR_532') device_drivers_xr = BooleanField('XR') device_drivers_ietf_l2vpn = BooleanField('IETF L2VPN') device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index 4590c7f01a24e801ecc775ad0b22cf0dcdea3452..110a19b402da15697a903e80729c52a118031ba0 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -116,8 +116,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4) if form.device_drivers_ietf_network_topology.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY) - if form.device_drivers_onf_tr_352.data: - device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352) + if form.device_drivers_onf_tr_532.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532) if form.device_drivers_xr.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) if form.device_drivers_ietf_l2vpn.data: diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html index c9165667dd8c089e91400f652177b4ca4ec98010..c115657aa08828849172345ca50caaeb4150fe0f 100644 --- a/src/webui/service/templates/device/add.html +++ b/src/webui/service/templates/device/add.html @@ -87,7 +87,7 @@ <br /> {{ form.device_drivers_p4 }} {{ form.device_drivers_p4.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_ietf_network_topology }} {{form.device_drivers_ietf_network_topology.label(class="col-sm-3 col-form-label") }} - {{ form.device_drivers_onf_tr_352 }} {{ form.device_drivers_onf_tr_352.label(class="col-sm-3 col-form-label") }} + {{ form.device_drivers_onf_tr_532 }} {{ form.device_drivers_onf_tr_532.label(class="col-sm-3 col-form-label") }} <br /> {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_ietf_l2vpn }} {{ form.device_drivers_ietf_l2vpn.label(class="col-sm-3 col-form-label") }}