diff --git a/manifests/computeservice.yaml b/manifests/computeservice.yaml index 7e40ef988bc7dcb77960b224dfe5626ee95cfdfb..378e34b9b4345a3a65f848dbd7a3b3e3753b8a05 100644 --- a/manifests/computeservice.yaml +++ b/manifests/computeservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: computeservice + replicas: 1 template: metadata: labels: @@ -44,16 +45,18 @@ spec: command: ["/bin/grpc_health_probe", "-addr=:9090"] resources: requests: - cpu: 250m - memory: 512Mi + cpu: 50m + memory: 64Mi limits: - cpu: 700m - memory: 1024Mi + cpu: 500m + memory: 512Mi --- apiVersion: v1 kind: Service metadata: name: computeservice + labels: + app: computeservice spec: type: ClusterIP selector: diff --git a/manifests/webuiservice.yaml b/manifests/webuiservice.yaml index f25dbf6e501775d56f266699b1474429b42b2015..234075f738abd880a7c269cb07b72ad6c635d4c6 100644 --- a/manifests/webuiservice.yaml +++ b/manifests/webuiservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: webuiservice + replicas: 1 template: metadata: labels: @@ -55,11 +56,11 @@ spec: timeoutSeconds: 1 resources: requests: - cpu: 100m - memory: 512Mi + cpu: 50m + memory: 64Mi limits: - cpu: 700m - memory: 1024Mi + cpu: 500m + memory: 512Mi - name: grafana image: grafana/grafana:8.5.11 imagePullPolicy: IfNotPresent @@ -92,16 +93,18 @@ spec: timeoutSeconds: 1 resources: requests: - cpu: 250m - memory: 750Mi + cpu: 150m + memory: 512Mi limits: - cpu: 700m + cpu: 500m memory: 1024Mi --- apiVersion: v1 kind: Service metadata: name: webuiservice + labels: + app: webuiservice spec: type: ClusterIP selector: diff --git a/ofc23 b/ofc23 new file mode 120000 index 0000000000000000000000000000000000000000..a1135d4c59a81997350864319a6c267eaaf9ed93 --- /dev/null +++ b/ofc23 @@ -0,0 +1 @@ +src/tests/ofc23/ \ No newline at end of file diff --git a/proto/context.proto b/proto/context.proto index 49d16229cdac5de84f25cfaa7d196d25184f46f0..2dfbb7805eb444ee94e27bb00ca05d9a1c83b8ec 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -191,6 +191,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; DEVICEDRIVER_ONF_TR_352 = 5; DEVICEDRIVER_XR = 6; + DEVICEDRIVER_IETF_L2VPN = 7; } enum DeviceOperationalStatusEnum { diff --git a/scripts/show_logs_compute.sh b/scripts/show_logs_compute.sh index fc992eb43e5872b4522db6f5c8ce39207f12d559..f0c24b63aa7b7e5c6678659c34dee34e8ce5b49e 100755 --- a/scripts/show_logs_compute.sh +++ b/scripts/show_logs_compute.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/computeservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/computeservice -c server diff --git a/scripts/show_logs_device.sh b/scripts/show_logs_device.sh index 6a77c38152716f1e6fbf320671dda25d974431c8..e643f563a6b8ba250985b013cecc9340c53c9411 100755 --- a/scripts/show_logs_device.sh +++ b/scripts/show_logs_device.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server diff --git a/scripts/show_logs_load_generator.sh b/scripts/show_logs_load_generator.sh index d0f2527d74840d48a10e0ec7ba018f513eea2c52..51438f181f5492a1c9c9bc8dd0b5a76f6db1046c 100755 --- a/scripts/show_logs_load_generator.sh +++ b/scripts/show_logs_load_generator.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/load-generatorservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/load-generatorservice -c server diff --git a/scripts/show_logs_monitoring.sh b/scripts/show_logs_monitoring.sh index 1a152a32216545f53607880c3908266f4ac41e95..61b0b5cc024f89daeffc0745c2689d85500f4115 100755 --- a/scripts/show_logs_monitoring.sh +++ b/scripts/show_logs_monitoring.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/monitoringservice server +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/monitoringservice -c server diff --git a/scripts/show_logs_service.sh b/scripts/show_logs_service.sh index 7ca1c1c2f4286a5fc46f7d36197d376472b447ed..cc75e19c64935f99c7919f9371717b91b0e6b3cb 100755 --- a/scripts/show_logs_service.sh +++ b/scripts/show_logs_service.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server diff --git a/scripts/show_logs_slice.sh b/scripts/show_logs_slice.sh index c71bc92eaa4a8d411372fc0ad4194881a5a2a9c8..7fa8091cce081ff7cef152f465bea8e426b40124 100755 --- a/scripts/show_logs_slice.sh +++ b/scripts/show_logs_slice.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server 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 08691b5266b8172a2bd0449df870033bd2664dd0..b0729aa55b25da030f9722330e22a0976a3d007f 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java +++ b/src/automation/src/main/java/eu/teraflow/automation/Serializer.java @@ -853,6 +853,8 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352; case XR: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; + case IETF_L2VPN: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN; case UNDEFINED: default: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED; @@ -874,6 +876,8 @@ public class Serializer { return DeviceDriverEnum.ONF_TR_352; case DEVICEDRIVER_XR: return DeviceDriverEnum.XR; + case DEVICEDRIVER_IETF_L2VPN: + return DeviceDriverEnum.IETF_L2VPN; case DEVICEDRIVER_UNDEFINED: case UNRECOGNIZED: default: 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 a364bb0e3cb821d20061d574428984acacb0cc46..3a26937e79d0df2cfead305a10ccadf3c54eae89 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 @@ -23,5 +23,6 @@ public enum DeviceDriverEnum { P4, IETF_NETWORK_TOPOLOGY, ONF_TR_352, - XR + 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 494e608a105897fe005a18b7041b34fe95b40f8b..0931054c682dede502fb9f22bf911439e52c2140 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java +++ b/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java @@ -1215,6 +1215,8 @@ class SerializerTest { DeviceDriverEnum.ONF_TR_352, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352), Arguments.of(DeviceDriverEnum.XR, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR), + Arguments.of( + DeviceDriverEnum.IETF_L2VPN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN), Arguments.of( DeviceDriverEnum.UNDEFINED, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)); } diff --git a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java index 060e81a556893b1ca3c60928569983506bff3672..b1bccdeccf564b0d8d7bd2a8606f614b00ede972 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java @@ -177,6 +177,10 @@ public final class ContextOuterClass { * DEVICEDRIVER_XR = 6; */ DEVICEDRIVER_XR(6), + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + DEVICEDRIVER_IETF_L2VPN(7), UNRECOGNIZED(-1), ; @@ -212,6 +216,10 @@ public final class ContextOuterClass { * DEVICEDRIVER_XR = 6; */ public static final int DEVICEDRIVER_XR_VALUE = 6; + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; public final int getNumber() { @@ -245,6 +253,7 @@ public final class ContextOuterClass { case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; case 5: return DEVICEDRIVER_ONF_TR_352; case 6: return DEVICEDRIVER_XR; + case 7: return DEVICEDRIVER_IETF_L2VPN; default: return null; } } diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index 99255defdb6b5ee155607536a2e13d23b97b2d3a..bb8948585f163aeb84ee758b8581bc6509d29799 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -25,9 +25,12 @@ class DeviceTypeEnum(Enum): EMULATED_OPEN_LINE_SYSTEM = 'emu-open-line-system' EMULATED_OPTICAL_ROADM = 'emu-optical-roadm' EMULATED_OPTICAL_TRANSPONDER = 'emu-optical-transponder' + EMULATED_OPTICAL_SPLITTER = 'emu-optical-splitter' # passive component required for XR Constellation EMULATED_P4_SWITCH = 'emu-p4-switch' + EMULATED_PACKET_RADIO_ROUTER = 'emu-packet-radio-router' EMULATED_PACKET_ROUTER = 'emu-packet-router' EMULATED_PACKET_SWITCH = 'emu-packet-switch' + EMULATED_XR_CONSTELLATION = 'emu-xr-constellation' # Real device types DATACENTER = 'datacenter' @@ -36,6 +39,10 @@ class DeviceTypeEnum(Enum): OPTICAL_ROADM = 'optical-roadm' OPTICAL_TRANSPONDER = 'optical-transponder' P4_SWITCH = 'p4-switch' + PACKET_RADIO_ROUTER = 'packet-radio-router' PACKET_ROUTER = 'packet-router' PACKET_SWITCH = 'packet-switch' - XR_CONSTELLATION = 'xr-constellation' \ No newline at end of file + XR_CONSTELLATION = 'xr-constellation' + + # ETSI TeraFlowSDN controller + TERAFLOWSDN_CONTROLLER = 'teraflowsdn' diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py index 0cc4555d455bf28ac2143a5d58b87e084a8360c7..66c87b14dd866d44b5d48addf93d172aea962f8e 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -43,6 +43,9 @@ DEVICE_MICROWAVE_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY] DEVICE_P4_TYPE = DeviceTypeEnum.P4_SWITCH.value DEVICE_P4_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_P4] +DEVICE_TFS_TYPE = DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value +DEVICE_TFS_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN] + def json_device_id(device_uuid : str): return {'device_uuid': {'uuid': device_uuid}} @@ -120,6 +123,13 @@ def json_device_p4_disabled( return json_device( device_uuid, DEVICE_P4_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules, drivers=drivers) +def json_device_tfs_disabled( + device_uuid : str, endpoints : List[Dict] = [], config_rules : List[Dict] = [], + drivers : List[Dict] = DEVICE_TFS_DRIVERS + ): + return json_device( + device_uuid, DEVICE_TFS_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules, drivers=drivers) + def json_device_connect_rules(address : str, port : int, settings : Dict = {}): return [ json_config_rule_set('_connect/address', address), diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index c0442d8770c682ac1eea032980b58e7028be90c4..ba82e535ec958104bd14abf625eb6cd38c2a08ee 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -33,6 +33,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY', 'DEVICEDRIVER_ONF_TR_352', 'DEVICEDRIVER_XR', + 'DEVICEDRIVER_IETF_L2VPN', ] def validate_device_operational_status_enum(message): diff --git a/src/compute/service/__main__.py b/src/compute/service/__main__.py index 9705e3187ffff633a4d127855c1c57afcf397e39..19a04c4c8ef4f77b3b7fb6949a1b567ef5cbec00 100644 --- a/src/compute/service/__main__.py +++ b/src/compute/service/__main__.py @@ -22,6 +22,7 @@ from .ComputeService import ComputeService from .rest_server.RestServer import RestServer from .rest_server.nbi_plugins.debug_api import register_debug_api from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss terminate = threading.Event() LOGGER = None @@ -58,8 +59,9 @@ def main(): grpc_service.start() rest_server = RestServer() + register_ietf_l2vpn(rest_server) # Registering L2VPN entrypoint + register_ietf_nss(rest_server) # Registering NSS entrypoint register_debug_api(rest_server) - register_ietf_l2vpn(rest_server) rest_server.start() # Wait for Ctrl+C or termination signal diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py index f95b532af4ba01968d17bc3958e1cffbf84a5e7f..ed25dbab3cd6b07ef73d64c5d37ad64e85353c02 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py @@ -74,4 +74,18 @@ BEARER_MAPPINGS = { 'R3:1/3': ('R3', '1/3', '5.3.1.3', None, 0, None, None, None, None), 'R4:1/2': ('R4', '1/2', '5.4.1.2', None, 0, None, None, None, None), 'R4:1/3': ('R4', '1/3', '5.4.1.3', None, 0, None, None, None, None), + + # OFC'23 + 'PE1:1/1': ('PE1', '1/1', '10.1.1.1', None, 0, None, None, None, None), + 'PE1:1/2': ('PE1', '1/2', '10.1.1.2', None, 0, None, None, None, None), + 'PE2:1/1': ('PE2', '1/1', '10.2.1.1', None, 0, None, None, None, None), + 'PE2:1/2': ('PE2', '1/2', '10.2.1.2', None, 0, None, None, None, None), + 'PE3:1/1': ('PE3', '1/1', '10.3.1.1', None, 0, None, None, None, None), + 'PE3:1/2': ('PE3', '1/2', '10.3.1.2', None, 0, None, None, None, None), + 'PE4:1/1': ('PE4', '1/1', '10.4.1.1', None, 0, None, None, None, None), + 'PE4:1/2': ('PE4', '1/2', '10.4.1.2', None, 0, None, None, None, None), + + 'R149:eth-1/0/22': ('R149', 'eth-1/0/22', '5.5.5.5', None, 0, None, None, '5.5.5.1', '100'), + 'R155:eth-1/0/22': ('R155', 'eth-1/0/22', '5.5.5.1', None, 0, None, None, '5.5.5.5', '100'), + 'R199:eth-1/0/21': ('R199', 'eth-1/0/21', '5.5.5.6', None, 0, None, None, '5.5.5.5', '100'), } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py index 2db231221faad1af2c7f0651dee2b95427e97acd..f12c4526aec27a60e579540ecae90720c707a117 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py @@ -20,8 +20,8 @@ from common.proto.context_pb2 import SliceStatusEnum from common.tools.context_queries.Slice import get_slice from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR LOGGER = logging.getLogger(__name__) diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py index dcdecb70ffff4059e557d1dadbbb958a4e264fab..69676bd0d0165160da4e64c515d04b5a3252102c 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py @@ -22,9 +22,9 @@ from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import SliceStatusEnum, Slice from slice.client.SliceClient import SliceClient from .schemas.vpn_service import SCHEMA_VPN_SERVICE -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR -from .tools.Validator import validate_message +from compute.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from compute.service.rest_server.nbi_plugins.tools.Validator import validate_message +from compute.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH LOGGER = logging.getLogger(__name__) diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py index b89fa2207d1cd69e30612e8cecc8aa0f325e9dd3..ff7ad3c1481d3c0f3cdf7a6b6004f62677948ecc 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py @@ -30,11 +30,10 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient from .schemas.site_network_access import SCHEMA_SITE_NETWORK_ACCESS -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR -from .tools.Validator import validate_message -from .Constants import ( - BEARER_MAPPINGS, DEFAULT_ADDRESS_FAMILIES, DEFAULT_BGP_AS, DEFAULT_BGP_ROUTE_TARGET, DEFAULT_MTU) +from compute.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from compute.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR +from compute.service.rest_server.nbi_plugins.tools.Validator import validate_message +from .Constants import BEARER_MAPPINGS, DEFAULT_ADDRESS_FAMILIES, DEFAULT_BGP_AS, DEFAULT_BGP_ROUTE_TARGET, DEFAULT_MTU LOGGER = logging.getLogger(__name__) diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py new file mode 100644 index 0000000000000000000000000000000000000000..f9b17c8b144ad6cf477b978ceb50b3497c9c074b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -0,0 +1,78 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from flask.json import jsonify +from flask_restful import Resource +from common.proto.context_pb2 import SliceStatusEnum +from common.tools.context_queries.Slice import get_slice +from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient +from slice.client.SliceClient import SliceClient +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR + +LOGGER = logging.getLogger(__name__) + +class NSS_Service(Resource): + @HTTP_AUTH.login_required + def get(self, slice_id : str): + LOGGER.debug('GET Slice ID: {:s}'.format(str(slice_id))) + try: + context_client = ContextClient() + + target = get_slice(context_client, slice_id, rw_copy=True) + if target is None: + raise Exception('Slice({:s}) not found in database'.format(str(slice_id))) + + if target.slice_id.slice_uuid.uuid != slice_id: # pylint: disable=no-member + raise Exception('Slice retrieval failed. Wrong Slice Id was returned') + + slice_ready_status = SliceStatusEnum.SLICESTATUS_ACTIVE + slice_status = target.slice_status.slice_status # pylint: disable=no-member + response = jsonify(grpc_message_to_json(target)) + response.status_code = HTTP_OK if slice_status == slice_ready_status else HTTP_GATEWAYTIMEOUT + + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Retrieving Slice({:s})'.format(str(slice_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response + + + @HTTP_AUTH.login_required + def delete(self, slice_id : str): + LOGGER.debug('DELETE Slice ID: {:s}'.format(str(slice_id))) + try: + context_client = ContextClient() + target = get_slice(context_client, slice_id) + + response = jsonify({}) + response.status_code = HTTP_OK + + if target is None: + LOGGER.warning('Slice({:s}) not found in database. Nothing done.'.format(str(slice_id))) + response.status_code = HTTP_NOCONTENT + else: + if target.slice_id.slice_uuid.uuid != slice_id: # pylint: disable=no-member + raise Exception('Slice retrieval failed. Wrong Slice Id was returned') + slice_client = SliceClient() + slice_client.DeleteSlice(target.slice_id) + LOGGER.debug(f"Slice({slice_id}) successfully deleted") + + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Deleting Slice({:s})'.format(str(slice_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response \ No newline at end of file diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py new file mode 100644 index 0000000000000000000000000000000000000000..72b09f2b7d1422da2554a3dfe873a6bcff87413d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -0,0 +1,122 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import json +import logging +import ssl +import uuid +from typing import Dict +from flask.json import jsonify +from flask_restful import Resource +from flask import request + +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import Slice, SliceStatusEnum, EndPointId, Constraint +from common.tools.grpc.Tools import grpc_message_to_json +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_BADREQUEST, HTTP_OK, HTTP_CREATED, HTTP_SERVERERROR +from werkzeug.exceptions import UnsupportedMediaType + +from slice.client.SliceClient import SliceClient +from .bindings import load_json_data +from .bindings.network_slice_services import NetworkSliceServices + +LOGGER = logging.getLogger(__name__) + +class NSS_Services(Resource): + @HTTP_AUTH.login_required + def get(self): + response = jsonify({"message": "All went well!"}) + # TODO Return list of current network-slice-services + return response + + @HTTP_AUTH.login_required + def post(self): + if not request.is_json: + raise UnsupportedMediaType('JSON payload is required') + request_data = json.dumps(request.json) + response = jsonify({}) + response.status_code = HTTP_CREATED + + slices: NetworkSliceServices = load_json_data(request_data, NetworkSliceServices)[0] + for ietf_slice in slices.slice_service: + slice_request: Slice = Slice() + # Meta information + # TODO implement name and owner based on "tags" + slice_request.slice_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + slice_request.slice_id.slice_uuid.uuid = ietf_slice.service_id() + # TODO map with admin status of IETF Slice + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + + list_endpoints = [] + for sdp in ietf_slice.sdps().sdp: + endpoint = EndPointId() + endpoint.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + endpoint.device_id.device_uuid.uuid = sdp.node_id() + endpoint.endpoint_uuid.uuid = sdp.sdp_id() + list_endpoints.append(endpoint) + slice_request.slice_endpoint_ids.extend(list_endpoints) + + # TODO Map connectivity_groups and connectivity constructs to real connections + LOGGER.debug(f"Connection groups detected: {len(ietf_slice.connection_groups().connection_group())}") + list_constraints = [] + for cg in ietf_slice.connection_groups().connection_group: + for cc in cg.connectivity_construct: + if cc.slo_sle_policy.custom: + with cc.slo_sle_policy.custom as slo: + for metric_bound in slo.service_slo_sle_policy().metric_bounds().metric_bound: + metric_type = str(metric_bound.metric_type()).casefold() + if metric_type == "service-slo-two-way-bandwidth": # TODO fix to two way! + constraint = Constraint() + metric_unit = metric_bound.metric_unit().casefold() + capacity = float(metric_bound.bound()) # Assuming capacity already in Gbps + if metric_unit == "mbps": + capacity /= 1E3 + elif metric_unit != "gbps": + LOGGER.warning(f"Invalided metric unit ({metric_bound.metric_unit()}), must be Mbps or Gbps") + response.status_code = HTTP_SERVERERROR + return response + constraint.sla_capacity.capacity_gbps = capacity + list_constraints.append(constraint) + + elif metric_type == "service-slo-one-way-delay": + if metric_bound.metric_unit().casefold() == "ms": + latency = int(metric_bound.bound()) + else: + LOGGER.warning(f"Invalided metric unit ({metric_bound.metric_unit()}), must be \"ms\" ") + response.status_code = HTTP_SERVERERROR + return response + constraint = Constraint() + constraint.sla_latency.e2e_latency_ms = latency + list_constraints.append(constraint) + + elif metric_type == "service-slo-availability": + availability = float(metric_bound.bound()) + if availability > 100.0 or availability < 0.0: + raise Exception(f'Slice SLO availability ({availability}) must be constrained [0,100]') + constraint = Constraint() + constraint.sla_availability.availability = availability + # TODO not really necessary, remove after OFC2023 + constraint.sla_availability.num_disjoint_paths = 0 + constraint.sla_availability.all_active = False + list_constraints.append(constraint) + + slice_request.slice_constraints.extend(list_constraints) + LOGGER.debug(grpc_message_to_json(slice_request)) # TODO remove + # TODO adding owner, needs to be recoded after updating the bindings + owner = request.json["data"]["ietf-network-slice-service:network-slice-services"]["slice-service"][0]["service-tags"][0]["value"] + slice_request.slice_owner.owner_string = owner + slice_request.slice_owner.owner_uuid.uuid = str(uuid.uuid5(uuid.NAMESPACE_DNS, owner)) + slice_client = SliceClient() + slice_client.CreateSlice(slice_request) + return response diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8aca124acfd15b2003b4272cf0b3103dbca3bdb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -0,0 +1,31 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# IETF draft-ietf-teas-ietf-network-slice-nbi-yang-02 - IETF Network Slice Service YANG Model +# Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ + +from flask_restful import Resource +from compute.service.rest_server.RestServer import RestServer +from .NSS_Services import NSS_Services +from .NSS_Service import NSS_Service + +URL_PREFIX = '/data/ietf-network-slice-service:ietf-nss' + +def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): + urls = [(URL_PREFIX + url) for url in urls] + rest_server.add_resource(resource, *urls, **kwargs) + +def register_ietf_nss(rest_server : RestServer): + _add_resource(rest_server, NSS_Services, '/network-slice-services') + _add_resource(rest_server, NSS_Service, '/network-slice-services/slice-service=') diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7a0c786e1defad55a4dcc20461b221472d3be687 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py @@ -0,0 +1,535 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from itertools import chain +from typing import ( + Any, AnyStr, Dict, Iterator, List, Optional, Tuple, Type, Union) + +import json + + +class YANGMember: + + _yang_name: str = None + _yang_namespace: str = None + _yang_module_name: str = None + + def __init__( + self, yang_name: str, yang_namespace: str, + yang_module_name: str): + + self._yang_name = yang_name + self._yang_namespace = yang_namespace + self._yang_module_name = yang_module_name + + @property + def yang_name(self) -> str: + return self._yang_name + + @property + def yang_namespace(self) -> str: + return self._yang_namespace + + @property + def yang_module_name(self) -> str: + return self._yang_module_name + + +class YANGLeafMember(YANGMember): + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_name = self._yang_name + yang_member = self + + class ChildLeaf: + + def __call__(self): + data = instance._data + if (key := yang_name) in data: + return data[key] + + return data.get(':'.join(( + yang_member._yang_module_name, yang_name))) + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def __repr__(self): + return ( + f"<{owner.__qualname__}.{type(self).__name__}: " + + f"{yang_member._yang_module_name}" + + f":{yang_member.yang_name}>") + + return ChildLeaf() + + def __set__(self, instance, value): + if instance is None: + return + + data = instance._data + if ((key := ':'.join((self._yang_module_name, self._yang_name))) + in data): + + data[key] = value + else: + data[self._yang_name] = value + + +class YANGContainerMember(YANGMember): + + _yang_container_type: Type['YANGContainer'] = None + + def __init__(self, yang_container_type: Type['YANGContainer']): + super().__init__( + yang_container_type._yang_name, + yang_container_type._yang_namespace, + yang_container_type._yang_module_name) + + self._yang_container_type = yang_container_type + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_container_type = self._yang_container_type + yang_name = self._yang_name + yang_member = self + + class ChildContainer: + + def __call__(self) -> yang_container_type: + data = instance._data + + if (key := ':'.join(( + yang_member._yang_module_name, yang_name))) in data: + + child_data = data[key] + else: + child_data = data.setdefault(yang_name, {}) + + return yang_container_type({yang_name: child_data}) + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def to_json(self, yang_parent_module_name: str=None): + return self().to_json( + yang_parent_module_name=yang_parent_module_name) + + return ChildContainer() + + +class YANGListMember(YANGMember): + + _yang_list_item_type: Type['YANGListItem'] = None + + def __init__(self, yang_list_item_type: Type['YANGListItem']): + super().__init__( + yang_list_item_type._yang_name, + yang_list_item_type._yang_namespace, + yang_list_item_type._yang_module_name) + + self._yang_list_item_type = yang_list_item_type + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_list_item_type = self._yang_list_item_type + yang_name = self._yang_name + yang_member = self + + class ChildList: + + @staticmethod + def _child_data_list(): + data = instance._data + if (key := ':'.join(( + yang_member._yang_module_name, yang_name))) in data: + + return data[key] + + return data.setdefault(yang_name, []) + + def __call__(self) -> List[yang_list_item_type]: + return list(iter(self)) + + def __iter__(self) -> Iterator[yang_list_item_type]: + for child_data in self._child_data_list(): + yield yang_list_item_type({yang_name: [child_data]}) + + def __getitem__(self, key) -> yang_list_item_type: + child_data_list = self._child_data_list() + child = yang_list_item_type( + {yang_member._yang_name: child_data_list}, + json_data_list_key=key) + + if not id(child_data := child._data) in map( + id, child_data_list): + child_data_list.append(child_data) + return child + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def to_json(self, yang_parent_module_name=None): + json_data = {} + for child in self(): + for child_name, child_data_list in (child.to_json( + yang_parent_module_name=( + yang_parent_module_name))).items(): + + json_data.setdefault(child_name, []).extend( + child_data_list) + + return json_data + + return ChildList() + + +class YANGContainer: + """Base class for YANG container handlers.""" + + _yang_name: str = None + _yang_namespace: str = None + _yang_module_name: str = None + + _data: Dict[str, Any] = None + + _yang_leaf_members: Dict[str, YANGLeafMember] = None + _yang_container_members: Dict[str, YANGContainerMember] = None + _yang_list_members: Dict[str, YANGListMember] = None + + _yang_choices: Dict[str, 'YANGChoice'] = None + + def __init__( + self, json_data: Optional[Union[AnyStr, Dict[str, Any]]]=None): + + if json_data is None: + self._data = {} + return + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + if (key := ':'.join(( + self._yang_module_name, self._yang_name))) not in json_data: + key = self._yang_name + + data = json_data.get(key, {}) + if not isinstance(data, dict): + raise TypeError(f"{key!r} should be a dict, not: {type(data)}") + + for yang_choice in self._yang_choices.values(): + yang_choice(data) + + self._data = data + + @property + def yang_name(self) -> str: + return self._yang_name + + @property + def yang_namespace(self) -> str: + return self._yang_namespace + + @property + def yang_module_name(self) -> str: + return self._yang_module_name + + def to_json(self, yang_parent_module_name=None) -> Dict[str, Any]: + + def child_items(): + for yang_name, yang_member in self._yang_leaf_members.items(): + if (value := yang_member.__get__(self)()) is not None: + + if (yang_child_module_name := + yang_member.yang_module_name) != ( + self._yang_module_name): + + child_key = ':'.join(( + yang_child_module_name, yang_name)) + else: + child_key = yang_name + + yield child_key, value + + for yang_name, yang_member in ( + self._yang_container_members.items()): + + if yang_name in self._data or ':'.join(( + yang_member._yang_namespace, + yang_name)) in self._data: + + yield from yang_member.__get__(self).to_json( + yang_parent_module_name=( + self._yang_module_name)).items() + + for yang_name, yang_member in self._yang_list_members.items(): + if yang_name in self._data or ':'.join(( + yang_member._yang_namespace, + yang_name)) in self._data: + + yield from yang_member.__get__(self).to_json( + yang_parent_module_name=( + self._yang_module_name)).items() + + for yang_choice in self._yang_choices.values(): + if (yang_case_container := + yang_choice._yang_case_container) is not None: + + yield from next(iter(yang_case_container.to_json( + yang_parent_module_name=( + self._yang_module_name)).values())).items() + + if (yang_module_name := self._yang_module_name) != ( + yang_parent_module_name): + key = ':'.join((yang_module_name, self._yang_name)) + else: + key = self._yang_name + + return {key: dict(child_items())} + + +class YANGListItem(YANGContainer): + """Base class for YANG list item handlers.""" + + _yang_list_key_names: Tuple[str] = None + + def __init__( + self, json_data: Optional[Union[AnyStr, Dict[str, Any]]]=None, + json_data_list_key=None): + + if json_data is None: + raise ValueError(f"{self._yang_name!r} list needs input data") + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + if (key := ':'.join(( + self._yang_module_name, self._yang_name))) not in json_data: + key = self._yang_name + + data_list = json_data.get(key, []) + if not isinstance(data_list, list): + raise TypeError( + f"{key!r} should be a list, not: {type(data_list)}") + + if json_data_list_key is None: + if len(data_list) == 1: + data = data_list[0] + else: + raise ValueError(f"{key!r} list key is missing") + + else: + if not isinstance(json_data_list_key, tuple): + json_data_list_key = (json_data_list_key, ) + + for data in json_data.get(key, []): + if tuple( + data.get(yang_name) for yang_name + in self._yang_list_key_names) == json_data_list_key: + + break + else: + data = {key: value for key, value in zip( + self._yang_list_key_names, json_data_list_key)} + + if not isinstance(data, dict): + raise TypeError( + f"{key!r} list item should be a dict, not: {type(data)}") + + for yang_choice in self._yang_choices.values(): + yang_choice(data) + + self._data = data + + def yang_key(self): + if len(self._yang_list_key_names) == 1: + return self._yang_leaf_members[ + self._yang_list_key_names[0]].__get__(self)() + + return tuple( + self._yang_leaf_members[yang_name].__get__(self)() + for yang_name in self._yang_list_key_names) + + def to_json(self, yang_parent_module_name=None) -> Dict[str, list]: + return {key: [data] for key, data in super().to_json( + yang_parent_module_name=yang_parent_module_name).items()} + + +class YANGChoiceCase: + """Base class for YANG choice case handlers.""" + + _yang_name: str = None + + _yang_container_type: Type[YANGContainer] = None + + _yang_container: YANGContainer = None + + def __init__(self, yang_container_type: Type[YANGContainer]): + self._yang_container_type = yang_container_type + self._yang_name = yang_container_type._yang_name + + @property + def yang_name(self) -> str: + return self._yang_name + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_case_container_type = self._yang_container_type + yang_name = self._yang_name + yang_choice_case = self + + class Case: + + def __bool__(self) -> bool: + return (yang_case_container := + yang_choice_case._yang_container) is not None and ( + bool(yang_case_container._data)) + + def __call__(self, data: Optional[Dict[str, Any]]=None): + if data: + for yang_member in chain( + yang_case_container_type. + _yang_leaf_members.values(), + + yang_case_container_type. + _yang_container_members.values(), + + yang_case_container_type. + _yang_list_members.values()): + + if yang_member._yang_name in data or ':'.join(( + yang_member._yang_module_name, + yang_member._yang_name)) in data: + break + else: + data = None + + if data: + yang_choice_case._yang_container = ( + yang_case_container_type({yang_name: data})) + + elif yang_choice_case._yang_container is None: + yang_choice_case._yang_container = ( + yang_case_container_type()) + + return yang_choice_case._yang_container + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + return Case() + + +class YANGChoice(YANGMember): + """Base class for YANG choice handlers.""" + + _yang_parent: YANGContainer = None + + _yang_cases: Dict[str, YANGChoiceCase] = None + + def __init__(self, yang_parent: YANGContainer): + self._yang_parent = yang_parent + + def __call__(self, data: Dict[str, Any]): + for yang_case in self._yang_cases.values(): + yang_case.__get__(self)(data) + + @property + def _yang_case_container(self) -> YANGContainer: + for yang_case in self._yang_cases.values(): + if (yang_container := + yang_case._yang_container) is not None and ( + yang_container._data): + return yang_container + + +def load_json_data( + json_data: Union[AnyStr, Dict[str, Any]], + *yang_types: Type[YANGContainer]) -> List[YANGContainer]: + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + json_data = json_data.get('data', json_data) + + return [yang_type(json_data) for yang_type in yang_types] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5a00cae7ce23108a5db10e6192b315330e3a86b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py @@ -0,0 +1,141 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NacmMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: nacm + """ + from .groups import Groups + from .rule_list import RuleList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: nacm + """ + + def __init__(self): + super().__init__(Nacm) + + def __get__(self, instance, owner=None) -> ( + 'NacmMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Nacm': + pass + + def __enter__(self) -> 'Nacm': + pass + + +class Nacm( + YANGContainer, + metaclass=NacmMeta): + """ + YANG container handler. + + YANG name: nacm + """ + + _yang_name: Final[str] = 'nacm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'denied-data-writes': ( + denied_data_writes := YANGLeafMember( + 'denied-data-writes', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'exec-default': ( + exec_default := YANGLeafMember( + 'exec-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'denied-notifications': ( + denied_notifications := YANGLeafMember( + 'denied-notifications', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'enable-external-groups': ( + enable_external_groups := YANGLeafMember( + 'enable-external-groups', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'enable-nacm': ( + enable_nacm := YANGLeafMember( + 'enable-nacm', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'read-default': ( + read_default := YANGLeafMember( + 'read-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'denied-operations': ( + denied_operations := YANGLeafMember( + 'denied-operations', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'write-default': ( + write_default := YANGLeafMember( + 'write-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'groups': ( + groups := ( # YANGContainerMember( + NacmMeta. + Groups. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'rule-list': ( + rule_list := ( # YANGListMember( + NacmMeta. + RuleList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Nacm': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e95275ad804d53820f3fc4a0210d60c645a70d14 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GroupsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: groups + """ + from .group import Group + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: groups + """ + + def __init__(self): + super().__init__(Groups) + + def __get__(self, instance, owner=None) -> ( + 'GroupsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Groups': + pass + + def __enter__(self) -> 'Groups': + pass + + +class Groups( + YANGContainer, + metaclass=GroupsMeta): + """ + YANG container handler. + + YANG name: groups + """ + + _yang_name: Final[str] = 'groups' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'group': ( + group := ( # YANGListMember( + GroupsMeta. + Group. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Groups': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c294bb266b4b8f6416b1ffe0ea59276c5a109b0f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GroupMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: group + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: group + """ + + def __init__(self): + super().__init__(Group) + + def __get__(self, instance, owner=None) -> ( + 'GroupMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Group']: + pass + + def __iter__(self, key) -> Iterator['Group']: + return super().__iter__() + + def __getitem__(self, key) -> 'Group': + return super()[key] + + def __enter__(self) -> ( + 'GroupMeta.yang_list_descriptor'): + pass + + +class Group( + YANGListItem, + metaclass=GroupMeta): + """ + YANG list item handler. + + YANG name: group + """ + + _yang_name: Final[str] = 'group' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Group': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dd0f9808e43dd3930efcec86b5b484b4107b77f6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: rule-list + """ + from .rule import Rule + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: rule-list + """ + + def __init__(self): + super().__init__(RuleList) + + def __get__(self, instance, owner=None) -> ( + 'RuleListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RuleList']: + pass + + def __iter__(self, key) -> Iterator['RuleList']: + return super().__iter__() + + def __getitem__(self, key) -> 'RuleList': + return super()[key] + + def __enter__(self) -> ( + 'RuleListMeta.yang_list_descriptor'): + pass + + +class RuleList( + YANGListItem, + metaclass=RuleListMeta): + """ + YANG list item handler. + + YANG name: rule-list + """ + + _yang_name: Final[str] = 'rule-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'rule': ( + rule := ( # YANGListMember( + RuleListMeta. + Rule. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RuleList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ec5ba06dbf93901881ab6045d1896b85583a642 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: rule + """ + from .rule_type import RuleType + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: rule + """ + + def __init__(self): + super().__init__(Rule) + + def __get__(self, instance, owner=None) -> ( + 'RuleMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Rule']: + pass + + def __iter__(self, key) -> Iterator['Rule']: + return super().__iter__() + + def __getitem__(self, key) -> 'Rule': + return super()[key] + + def __enter__(self) -> ( + 'RuleMeta.yang_list_descriptor'): + pass + + +class Rule( + YANGListItem, + metaclass=RuleMeta): + """ + YANG list item handler. + + YANG name: rule + """ + + _yang_name: Final[str] = 'rule' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'action': ( + action := YANGLeafMember( + 'action', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'access-operations': ( + access_operations := YANGLeafMember( + 'access-operations', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'comment': ( + comment := YANGLeafMember( + 'comment', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'module-name': ( + module_name := YANGLeafMember( + 'module-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Rule': + instance = super().__new__(cls) + instance._yang_choices = { + + 'rule-type': + RuleMeta.RuleType( + instance), + } + return instance + + @property + def rule_type(self) -> ( + RuleMeta.RuleType): + return self._yang_choices['rule-type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d470943c38427e03302d60c52cf22cdb16597d37 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleTypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: rule-type + """ + + from .notification import Notification + from .protocol_operation import ProtocolOperation + from .data_node import DataNode + + class notification_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: notification + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.Notification) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.notification_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.Notification'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.Notification'): + pass + + class protocol_operation_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: protocol-operation + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.ProtocolOperation) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.protocol_operation_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.ProtocolOperation'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.ProtocolOperation'): + pass + + class data_node_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: data-node + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.DataNode) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.data_node_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.DataNode'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.DataNode'): + pass + + +class RuleType(YANGChoice, metaclass=RuleTypeMeta): + """ + YANG choice handler. + + YANG name: rule-type + """ + + _yang_name: Final[str] = 'rule-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'notification': ( + notification := ( # YANGChoiceCase( + RuleTypeMeta. + notification_case_descriptor())), + + 'protocol-operation': ( + protocol_operation := ( # YANGChoiceCase( + RuleTypeMeta. + protocol_operation_case_descriptor())), + + 'data-node': ( + data_node := ( # YANGChoiceCase( + RuleTypeMeta. + data_node_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f7ddf138eefd0c4a086a06a2b846e74bf45b1f6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class DataNodeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: data-node + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: data-node + """ + + def __init__(self): + super().__init__(DataNode) + + def __get__(self, instance, owner=None) -> ( + 'DataNodeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'DataNode': + pass + + def __enter__(self) -> 'DataNode': + pass + + +class DataNode( + YANGContainer, + metaclass=DataNodeMeta): + """ + YANG container handler. + + YANG name: data-node + """ + + _yang_name: Final[str] = 'data-node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path': ( + path := YANGLeafMember( + 'path', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'DataNode': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed29784183bf0d387a6c4facd935e0870251e560 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NotificationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: notification + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: notification + """ + + def __init__(self): + super().__init__(Notification) + + def __get__(self, instance, owner=None) -> ( + 'NotificationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Notification': + pass + + def __enter__(self) -> 'Notification': + pass + + +class Notification( + YANGContainer, + metaclass=NotificationMeta): + """ + YANG container handler. + + YANG name: notification + """ + + _yang_name: Final[str] = 'notification' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'notification-name': ( + notification_name := YANGLeafMember( + 'notification-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Notification': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1371c9edb91fac8da7f5bcdb3854d5dbc8cc2d1d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolOperationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: protocol-operation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: protocol-operation + """ + + def __init__(self): + super().__init__(ProtocolOperation) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolOperationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ProtocolOperation': + pass + + def __enter__(self) -> 'ProtocolOperation': + pass + + +class ProtocolOperation( + YANGContainer, + metaclass=ProtocolOperationMeta): + """ + YANG container handler. + + YANG name: protocol-operation + """ + + _yang_name: Final[str] = 'protocol-operation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'rpc-name': ( + rpc_name := YANGLeafMember( + 'rpc-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ProtocolOperation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..296b880921a48cd2087ba3a9f82c18324e03d7b0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkSliceServicesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: network-slice-services + """ + from .slo_sle_templates import SloSleTemplates + from .slice_service import SliceService + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: network-slice-services + """ + + def __init__(self): + super().__init__(NetworkSliceServices) + + def __get__(self, instance, owner=None) -> ( + 'NetworkSliceServicesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NetworkSliceServices': + pass + + def __enter__(self) -> 'NetworkSliceServices': + pass + + +class NetworkSliceServices( + YANGContainer, + metaclass=NetworkSliceServicesMeta): + """ + YANG container handler. + + YANG name: network-slice-services + """ + + _yang_name: Final[str] = 'network-slice-services' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'slo-sle-templates': ( + slo_sle_templates := ( # YANGContainerMember( + NetworkSliceServicesMeta. + SloSleTemplates. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'slice-service': ( + slice_service := ( # YANGListMember( + NetworkSliceServicesMeta. + SliceService. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NetworkSliceServices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e8520f1b36270cbc09d1acddda316eb7198c535 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py @@ -0,0 +1,147 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SliceServiceMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: slice-service + """ + from .connection_groups import ConnectionGroups + from .te_topology_identifier import TeTopologyIdentifier + from .status import Status + from .sdps import Sdps + from .service_tags import ServiceTags + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: slice-service + """ + + def __init__(self): + super().__init__(SliceService) + + def __get__(self, instance, owner=None) -> ( + 'SliceServiceMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SliceService']: + pass + + def __iter__(self, key) -> Iterator['SliceService']: + return super().__iter__() + + def __getitem__(self, key) -> 'SliceService': + return super()[key] + + def __enter__(self) -> ( + 'SliceServiceMeta.yang_list_descriptor'): + pass + + +class SliceService( + YANGListItem, + metaclass=SliceServiceMeta): + """ + YANG list item handler. + + YANG name: slice-service + """ + + _yang_name: Final[str] = 'slice-service' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'service-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'service-id': ( + service_id := YANGLeafMember( + 'service-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'service-description': ( + service_description := YANGLeafMember( + 'service-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connection-groups': ( + connection_groups := ( # YANGContainerMember( + SliceServiceMeta. + ConnectionGroups. + yang_container_descriptor())), + + 'te-topology-identifier': ( + te_topology_identifier := ( # YANGContainerMember( + SliceServiceMeta. + TeTopologyIdentifier. + yang_container_descriptor())), + + 'status': ( + status := ( # YANGContainerMember( + SliceServiceMeta. + Status. + yang_container_descriptor())), + + 'sdps': ( + sdps := ( # YANGContainerMember( + SliceServiceMeta. + Sdps. + yang_container_descriptor())), + + 'service-tags': ( + service_tags := ( # YANGContainerMember( + SliceServiceMeta. + ServiceTags. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SliceService': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + SliceServiceMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + SliceServiceMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a67fcd383e6ecaabe98b4aa1c1d892f68d21840f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connection-groups + """ + from .connection_group import ConnectionGroup + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connection-groups + """ + + def __init__(self): + super().__init__(ConnectionGroups) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectionGroups': + pass + + def __enter__(self) -> 'ConnectionGroups': + pass + + +class ConnectionGroups( + YANGContainer, + metaclass=ConnectionGroupsMeta): + """ + YANG container handler. + + YANG name: connection-groups + """ + + _yang_name: Final[str] = 'connection-groups' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connection-group': ( + connection_group := ( # YANGListMember( + ConnectionGroupsMeta. + ConnectionGroup. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroups': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38302dd8447f8af0dc7f4e9f133b2337ef8ef3c4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py @@ -0,0 +1,132 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connection-group + """ + from .connection_group_monitoring import ConnectionGroupMonitoring + from .connectivity_construct import ConnectivityConstruct + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connection-group + """ + + def __init__(self): + super().__init__(ConnectionGroup) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectionGroup']: + pass + + def __iter__(self, key) -> Iterator['ConnectionGroup']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectionGroup': + return super()[key] + + def __enter__(self) -> ( + 'ConnectionGroupMeta.yang_list_descriptor'): + pass + + +class ConnectionGroup( + YANGListItem, + metaclass=ConnectionGroupMeta): + """ + YANG list item handler. + + YANG name: connection-group + """ + + _yang_name: Final[str] = 'connection-group' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'connection-group-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'connectivity-type': ( + connectivity_type := YANGLeafMember( + 'connectivity-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'connection-group-id': ( + connection_group_id := YANGLeafMember( + 'connection-group-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'service-slo-sle-policy-override': ( + service_slo_sle_policy_override := YANGLeafMember( + 'service-slo-sle-policy-override', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connection-group-monitoring': ( + connection_group_monitoring := ( # YANGContainerMember( + ConnectionGroupMeta. + ConnectionGroupMonitoring. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-construct': ( + connectivity_construct := ( # YANGListMember( + ConnectionGroupMeta. + ConnectivityConstruct. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroup': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + ConnectionGroupMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + ConnectionGroupMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..395aabd46097a05d51746b4298b5fa845a369068 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py @@ -0,0 +1,127 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connection-group-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connection-group-monitoring + """ + + def __init__(self): + super().__init__(ConnectionGroupMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectionGroupMonitoring': + pass + + def __enter__(self) -> 'ConnectionGroupMonitoring': + pass + + +class ConnectionGroupMonitoring( + YANGContainer, + metaclass=ConnectionGroupMonitoringMeta): + """ + YANG container handler. + + YANG name: connection-group-monitoring + """ + + _yang_name: Final[str] = 'connection-group-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'one-way-delay-variation': ( + one_way_delay_variation := YANGLeafMember( + 'one-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-max-delay': ( + one_way_max_delay := YANGLeafMember( + 'one-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-packet-loss': ( + one_way_packet_loss := YANGLeafMember( + 'one-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-max-delay': ( + two_way_max_delay := YANGLeafMember( + 'two-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-min-delay': ( + two_way_min_delay := YANGLeafMember( + 'two-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-min-delay': ( + one_way_min_delay := YANGLeafMember( + 'one-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-packet-loss': ( + two_way_packet_loss := YANGLeafMember( + 'two-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-delay-variation': ( + two_way_delay_variation := YANGLeafMember( + 'two-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroupMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..124ac4ddc30dc414c79160077a4fc4042924472e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-construct + """ + from .connectivity_construct_monitoring import ConnectivityConstructMonitoring + from .slo_sle_policy import SloSlePolicy + from .connectivity_construct_type import ConnectivityConstructType + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-construct + """ + + def __init__(self): + super().__init__(ConnectivityConstruct) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityConstruct']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityConstruct']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityConstruct': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityConstructMeta.yang_list_descriptor'): + pass + + +class ConnectivityConstruct( + YANGListItem, + metaclass=ConnectivityConstructMeta): + """ + YANG list item handler. + + YANG name: connectivity-construct + """ + + _yang_name: Final[str] = 'connectivity-construct' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'cc-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'service-slo-sle-policy-override': ( + service_slo_sle_policy_override := YANGLeafMember( + 'service-slo-sle-policy-override', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cc-id': ( + cc_id := YANGLeafMember( + 'cc-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connectivity-construct-monitoring': ( + connectivity_construct_monitoring := ( # YANGContainerMember( + ConnectivityConstructMeta. + ConnectivityConstructMonitoring. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityConstruct': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + ConnectivityConstructMeta.SloSlePolicy( + instance), + + 'connectivity-construct-type': + ConnectivityConstructMeta.ConnectivityConstructType( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + ConnectivityConstructMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] + + @property + def connectivity_construct_type(self) -> ( + ConnectivityConstructMeta.ConnectivityConstructType): + return self._yang_choices['connectivity-construct-type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfca50ba90e73161807ba1173e7d5113348a7581 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py @@ -0,0 +1,127 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-construct-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-construct-monitoring + """ + + def __init__(self): + super().__init__(ConnectivityConstructMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityConstructMonitoring': + pass + + def __enter__(self) -> 'ConnectivityConstructMonitoring': + pass + + +class ConnectivityConstructMonitoring( + YANGContainer, + metaclass=ConnectivityConstructMonitoringMeta): + """ + YANG container handler. + + YANG name: connectivity-construct-monitoring + """ + + _yang_name: Final[str] = 'connectivity-construct-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'one-way-delay-variation': ( + one_way_delay_variation := YANGLeafMember( + 'one-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-max-delay': ( + two_way_max_delay := YANGLeafMember( + 'two-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-packet-loss': ( + two_way_packet_loss := YANGLeafMember( + 'two-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-packet-loss': ( + one_way_packet_loss := YANGLeafMember( + 'one-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-max-delay': ( + one_way_max_delay := YANGLeafMember( + 'one-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-delay-variation': ( + two_way_delay_variation := YANGLeafMember( + 'two-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-min-delay': ( + two_way_min_delay := YANGLeafMember( + 'two-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-min-delay': ( + one_way_min_delay := YANGLeafMember( + 'one-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityConstructMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6e1424075780ca5a04525d4124fb2af47404ec23 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructTypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: connectivity-construct-type + """ + + from .p2mp import P2mp + from .a2a import A2a + from .p2p import P2p + + class p2mp_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: p2mp + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.P2mp) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.p2mp_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.P2mp'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.P2mp'): + pass + + class a2a_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: a2a + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.A2a) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.a2a_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.A2a'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.A2a'): + pass + + class p2p_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: p2p + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.P2p) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.p2p_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.P2p'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.P2p'): + pass + + +class ConnectivityConstructType(YANGChoice, metaclass=ConnectivityConstructTypeMeta): + """ + YANG choice handler. + + YANG name: connectivity-construct-type + """ + + _yang_name: Final[str] = 'connectivity-construct-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'p2mp': ( + p2mp := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + p2mp_case_descriptor())), + + 'a2a': ( + a2a := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + a2a_case_descriptor())), + + 'p2p': ( + p2p := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + p2p_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e9d402c2c675f5f6b65fc17952ad0909b8059d2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class A2aMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: a2a + """ + from .a2a_sdp import A2aSdp + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: a2a + """ + + def __init__(self): + super().__init__(A2a) + + def __get__(self, instance, owner=None) -> ( + 'A2aMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'A2a': + pass + + def __enter__(self) -> 'A2a': + pass + + +class A2a( + YANGContainer, + metaclass=A2aMeta): + """ + YANG container handler. + + YANG name: a2a + """ + + _yang_name: Final[str] = 'a2a' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'a2a-sdp': ( + a2a_sdp := ( # YANGListMember( + A2aMeta. + A2aSdp. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'A2a': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fa176413be0dab678f83a0d9a41737c4bdd90859 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class A2aSdpMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: a2a-sdp + """ + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: a2a-sdp + """ + + def __init__(self): + super().__init__(A2aSdp) + + def __get__(self, instance, owner=None) -> ( + 'A2aSdpMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['A2aSdp']: + pass + + def __iter__(self, key) -> Iterator['A2aSdp']: + return super().__iter__() + + def __getitem__(self, key) -> 'A2aSdp': + return super()[key] + + def __enter__(self) -> ( + 'A2aSdpMeta.yang_list_descriptor'): + pass + + +class A2aSdp( + YANGListItem, + metaclass=A2aSdpMeta): + """ + YANG list item handler. + + YANG name: a2a-sdp + """ + + _yang_name: Final[str] = 'a2a-sdp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sdp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sdp-id': ( + sdp_id := YANGLeafMember( + 'sdp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'A2aSdp': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + A2aSdpMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + A2aSdpMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..afe092733209a8030bf14f62f3baf77eaabdd6bb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07832b8f39b43c7edd743e03c369c60d5c63624d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c308b850384ee650e0ea222b7776b52b378718fd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .path_constraints import PathConstraints + from .service_function import ServiceFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26189213c12a3803a76ecbcf06ff15c598e6dbce --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class P2mpMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: p2mp + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: p2mp + """ + + def __init__(self): + super().__init__(P2mp) + + def __get__(self, instance, owner=None) -> ( + 'P2mpMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'P2mp': + pass + + def __enter__(self) -> 'P2mp': + pass + + +class P2mp( + YANGContainer, + metaclass=P2mpMeta): + """ + YANG container handler. + + YANG name: p2mp + """ + + _yang_name: Final[str] = 'p2mp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'p2mp-sender-sdp': ( + p2mp_sender_sdp := YANGLeafMember( + 'p2mp-sender-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'P2mp': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5abb50263afbcf98d9fa2036fa274ba69695984f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class P2pMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: p2p + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: p2p + """ + + def __init__(self): + super().__init__(P2p) + + def __get__(self, instance, owner=None) -> ( + 'P2pMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'P2p': + pass + + def __enter__(self) -> 'P2p': + pass + + +class P2p( + YANGContainer, + metaclass=P2pMeta): + """ + YANG container handler. + + YANG name: p2p + """ + + _yang_name: Final[str] = 'p2p' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'p2p-sender-sdp': ( + p2p_sender_sdp := YANGLeafMember( + 'p2p-sender-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'p2p-receiver-sdp': ( + p2p_receiver_sdp := YANGLeafMember( + 'p2p-receiver-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'P2p': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..afe092733209a8030bf14f62f3baf77eaabdd6bb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32ab7d60c22d534b878f967b4bf57e0509583bbb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6d366eb1ff15535bea20dc431827e5f859bc4f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .steering_constraints import SteeringConstraints + from .metric_bounds import MetricBounds + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..23374967999723000d8649da5d3ec8d5489a5794 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3239d57811ab3ddff018c0347524513d77934aa --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdps + """ + from .sdp import Sdp + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdps + """ + + def __init__(self): + super().__init__(Sdps) + + def __get__(self, instance, owner=None) -> ( + 'SdpsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Sdps': + pass + + def __enter__(self) -> 'Sdps': + pass + + +class Sdps( + YANGContainer, + metaclass=SdpsMeta): + """ + YANG container handler. + + YANG name: sdps + """ + + _yang_name: Final[str] = 'sdps' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'sdp': ( + sdp := ( # YANGListMember( + SdpsMeta. + Sdp. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Sdps': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5fc0ff62c3ed5a5ea1a7d64e77edeb84d3edf286 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py @@ -0,0 +1,182 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: sdp + """ + from .sdp_monitoring import SdpMonitoring + from .outgoing_qos_policy import OutgoingQosPolicy + from .service_match_criteria import ServiceMatchCriteria + from .sdp_peering import SdpPeering + from .status import Status + from .attachment_circuits import AttachmentCircuits + from .location import Location + from .incoming_qos_policy import IncomingQosPolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: sdp + """ + + def __init__(self): + super().__init__(Sdp) + + def __get__(self, instance, owner=None) -> ( + 'SdpMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Sdp']: + pass + + def __iter__(self, key) -> Iterator['Sdp']: + return super().__iter__() + + def __getitem__(self, key) -> 'Sdp': + return super()[key] + + def __enter__(self) -> ( + 'SdpMeta.yang_list_descriptor'): + pass + + +class Sdp( + YANGListItem, + metaclass=SdpMeta): + """ + YANG list item handler. + + YANG name: sdp + """ + + _yang_name: Final[str] = 'sdp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sdp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sdp-id': ( + sdp_id := YANGLeafMember( + 'sdp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'peer-sap-id': ( + peer_sap_id := YANGLeafMember( + 'peer-sap-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'sdp-description': ( + sdp_description := YANGLeafMember( + 'sdp-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'sdp-ip': ( + sdp_ip := YANGLeafMember( + 'sdp-ip', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ltp': ( + ltp := YANGLeafMember( + 'ltp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'sdp-monitoring': ( + sdp_monitoring := ( # YANGContainerMember( + SdpMeta. + SdpMonitoring. + yang_container_descriptor())), + + 'outgoing-qos-policy': ( + outgoing_qos_policy := ( # YANGContainerMember( + SdpMeta. + OutgoingQosPolicy. + yang_container_descriptor())), + + 'service-match-criteria': ( + service_match_criteria := ( # YANGContainerMember( + SdpMeta. + ServiceMatchCriteria. + yang_container_descriptor())), + + 'sdp-peering': ( + sdp_peering := ( # YANGContainerMember( + SdpMeta. + SdpPeering. + yang_container_descriptor())), + + 'status': ( + status := ( # YANGContainerMember( + SdpMeta. + Status. + yang_container_descriptor())), + + 'attachment-circuits': ( + attachment_circuits := ( # YANGContainerMember( + SdpMeta. + AttachmentCircuits. + yang_container_descriptor())), + + 'location': ( + location := ( # YANGContainerMember( + SdpMeta. + Location. + yang_container_descriptor())), + + 'incoming-qos-policy': ( + incoming_qos_policy := ( # YANGContainerMember( + SdpMeta. + IncomingQosPolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Sdp': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..624b09988064151b30cfd5286a6a0ef6681e3dd0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttachmentCircuitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: attachment-circuits + """ + from .attachment_circuit import AttachmentCircuit + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: attachment-circuits + """ + + def __init__(self): + super().__init__(AttachmentCircuits) + + def __get__(self, instance, owner=None) -> ( + 'AttachmentCircuitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AttachmentCircuits': + pass + + def __enter__(self) -> 'AttachmentCircuits': + pass + + +class AttachmentCircuits( + YANGContainer, + metaclass=AttachmentCircuitsMeta): + """ + YANG container handler. + + YANG name: attachment-circuits + """ + + _yang_name: Final[str] = 'attachment-circuits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attachment-circuit': ( + attachment_circuit := ( # YANGListMember( + AttachmentCircuitsMeta. + AttachmentCircuit. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AttachmentCircuits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..93194779e9c37ccae0bca5adcb51ccfb0ff7c349 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py @@ -0,0 +1,166 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttachmentCircuitMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attachment-circuit + """ + from .ac_tags import AcTags + from .outgoing_qos_policy import OutgoingQosPolicy + from .incoming_qos_policy import IncomingQosPolicy + from .sdp_peering import SdpPeering + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attachment-circuit + """ + + def __init__(self): + super().__init__(AttachmentCircuit) + + def __get__(self, instance, owner=None) -> ( + 'AttachmentCircuitMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AttachmentCircuit']: + pass + + def __iter__(self, key) -> Iterator['AttachmentCircuit']: + return super().__iter__() + + def __getitem__(self, key) -> 'AttachmentCircuit': + return super()[key] + + def __enter__(self) -> ( + 'AttachmentCircuitMeta.yang_list_descriptor'): + pass + + +class AttachmentCircuit( + YANGListItem, + metaclass=AttachmentCircuitMeta): + """ + YANG list item handler. + + YANG name: attachment-circuit + """ + + _yang_name: Final[str] = 'attachment-circuit' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'ac-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'ac-node-id': ( + ac_node_id := YANGLeafMember( + 'ac-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-tp-id': ( + ac_tp_id := YANGLeafMember( + 'ac-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-ip-prefix-length': ( + ac_ip_prefix_length := YANGLeafMember( + 'ac-ip-prefix-length', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-ip-address': ( + ac_ip_address := YANGLeafMember( + 'ac-ip-address', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-description': ( + ac_description := YANGLeafMember( + 'ac-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-id': ( + ac_id := YANGLeafMember( + 'ac-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'peer-sap-id': ( + peer_sap_id := YANGLeafMember( + 'peer-sap-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'ac-tags': ( + ac_tags := ( # YANGContainerMember( + AttachmentCircuitMeta. + AcTags. + yang_container_descriptor())), + + 'outgoing-qos-policy': ( + outgoing_qos_policy := ( # YANGContainerMember( + AttachmentCircuitMeta. + OutgoingQosPolicy. + yang_container_descriptor())), + + 'incoming-qos-policy': ( + incoming_qos_policy := ( # YANGContainerMember( + AttachmentCircuitMeta. + IncomingQosPolicy. + yang_container_descriptor())), + + 'sdp-peering': ( + sdp_peering := ( # YANGContainerMember( + AttachmentCircuitMeta. + SdpPeering. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AttachmentCircuit': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a18ad45c114040f6b3d58ff592ea6cfd9461a8ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: ac-tags + """ + from .ac_tags import AcTags + from .ac_tag_opaque import AcTagOpaque + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: ac-tags + """ + + def __init__(self): + super().__init__(AcTags) + + def __get__(self, instance, owner=None) -> ( + 'AcTagsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AcTags': + pass + + def __enter__(self) -> 'AcTags': + pass + + +class AcTags( + YANGContainer, + metaclass=AcTagsMeta): + """ + YANG container handler. + + YANG name: ac-tags + """ + + _yang_name: Final[str] = 'ac-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'ac-tags': ( + ac_tags := ( # YANGListMember( + AcTagsMeta. + AcTags. + yang_list_descriptor())), + + 'ac-tag-opaque': ( + ac_tag_opaque := ( # YANGListMember( + AcTagsMeta. + AcTagOpaque. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d56e829739daeecc91ead77fb6e40c954532a15e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagOpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: ac-tag-opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: ac-tag-opaque + """ + + def __init__(self): + super().__init__(AcTagOpaque) + + def __get__(self, instance, owner=None) -> ( + 'AcTagOpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AcTagOpaque']: + pass + + def __iter__(self, key) -> Iterator['AcTagOpaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'AcTagOpaque': + return super()[key] + + def __enter__(self) -> ( + 'AcTagOpaqueMeta.yang_list_descriptor'): + pass + + +class AcTagOpaque( + YANGListItem, + metaclass=AcTagOpaqueMeta): + """ + YANG list item handler. + + YANG name: ac-tag-opaque + """ + + _yang_name: Final[str] = 'ac-tag-opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-name': ( + tag_name := YANGLeafMember( + 'tag-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTagOpaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ef753261d2bf1b99a0fd2a2cf198785baffff1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagsMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: ac-tags + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: ac-tags + """ + + def __init__(self): + super().__init__(AcTags) + + def __get__(self, instance, owner=None) -> ( + 'AcTagsMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AcTags']: + pass + + def __iter__(self, key) -> Iterator['AcTags']: + return super().__iter__() + + def __getitem__(self, key) -> 'AcTags': + return super()[key] + + def __enter__(self) -> ( + 'AcTagsMeta.yang_list_descriptor'): + pass + + +class AcTags( + YANGListItem, + metaclass=AcTagsMeta): + """ + YANG list item handler. + + YANG name: ac-tags + """ + + _yang_name: Final[str] = 'ac-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'ac-tag-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'ac-tag-type': ( + ac_tag_type := YANGLeafMember( + 'ac-tag-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abad77461c9f94149dc016054d669526c83570af --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class IncomingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: incoming-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: incoming-qos-policy + """ + + def __init__(self): + super().__init__(IncomingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'IncomingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'IncomingQosPolicy': + pass + + def __enter__(self) -> 'IncomingQosPolicy': + pass + + +class IncomingQosPolicy( + YANGContainer, + metaclass=IncomingQosPolicyMeta): + """ + YANG container handler. + + YANG name: incoming-qos-policy + """ + + _yang_name: Final[str] = 'incoming-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + IncomingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'IncomingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..492759055bf57b40705a54dfd087f89fa61a87dc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..893cb264eba6e98af718d8244d262d0888793ca0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OutgoingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: outgoing-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: outgoing-qos-policy + """ + + def __init__(self): + super().__init__(OutgoingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'OutgoingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OutgoingQosPolicy': + pass + + def __enter__(self) -> 'OutgoingQosPolicy': + pass + + +class OutgoingQosPolicy( + YANGContainer, + metaclass=OutgoingQosPolicyMeta): + """ + YANG container handler. + + YANG name: outgoing-qos-policy + """ + + _yang_name: Final[str] = 'outgoing-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + OutgoingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OutgoingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..445a7a5df5d7db2b92ecb59f0f54a4c316328d78 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c7b5e10b24076aa3928995dc846b4e138516379b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpPeeringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-peering + """ + from .opaque import Opaque + from .protocol import Protocol + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-peering + """ + + def __init__(self): + super().__init__(SdpPeering) + + def __get__(self, instance, owner=None) -> ( + 'SdpPeeringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpPeering': + pass + + def __enter__(self) -> 'SdpPeering': + pass + + +class SdpPeering( + YANGContainer, + metaclass=SdpPeeringMeta): + """ + YANG container handler. + + YANG name: sdp-peering + """ + + _yang_name: Final[str] = 'sdp-peering' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'opaque': ( + opaque := ( # YANGListMember( + SdpPeeringMeta. + Opaque. + yang_list_descriptor())), + + 'protocol': ( + protocol := ( # YANGListMember( + SdpPeeringMeta. + Protocol. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpPeering': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b367227c3d43cd31c1b3df857ed944d62d371806 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: opaque + """ + + def __init__(self): + super().__init__(Opaque) + + def __get__(self, instance, owner=None) -> ( + 'OpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Opaque']: + pass + + def __iter__(self, key) -> Iterator['Opaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'Opaque': + return super()[key] + + def __enter__(self) -> ( + 'OpaqueMeta.yang_list_descriptor'): + pass + + +class Opaque( + YANGListItem, + metaclass=OpaqueMeta): + """ + YANG list item handler. + + YANG name: opaque + """ + + _yang_name: Final[str] = 'opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-name': ( + attribute_name := YANGLeafMember( + 'attribute-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Opaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..850f7d924c02b4a89030c1a7757b1e728ad35326 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: protocol + """ + from .attribute import Attribute + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: protocol + """ + + def __init__(self): + super().__init__(Protocol) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Protocol']: + pass + + def __iter__(self, key) -> Iterator['Protocol']: + return super().__iter__() + + def __getitem__(self, key) -> 'Protocol': + return super()[key] + + def __enter__(self) -> ( + 'ProtocolMeta.yang_list_descriptor'): + pass + + +class Protocol( + YANGListItem, + metaclass=ProtocolMeta): + """ + YANG list item handler. + + YANG name: protocol + """ + + _yang_name: Final[str] = 'protocol' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'protocol-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protocol-type': ( + protocol_type := YANGLeafMember( + 'protocol-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attribute': ( + attribute := ( # YANGListMember( + ProtocolMeta. + Attribute. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Protocol': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76180637c83f2a158838bacaae99add6e9fe5b61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttributeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attribute + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attribute + """ + + def __init__(self): + super().__init__(Attribute) + + def __get__(self, instance, owner=None) -> ( + 'AttributeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Attribute']: + pass + + def __iter__(self, key) -> Iterator['Attribute']: + return super().__iter__() + + def __getitem__(self, key) -> 'Attribute': + return super()[key] + + def __enter__(self) -> ( + 'AttributeMeta.yang_list_descriptor'): + pass + + +class Attribute( + YANGListItem, + metaclass=AttributeMeta): + """ + YANG list item handler. + + YANG name: attribute + """ + + _yang_name: Final[str] = 'attribute' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-type': ( + attribute_type := YANGLeafMember( + 'attribute-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Attribute': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abad77461c9f94149dc016054d669526c83570af --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class IncomingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: incoming-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: incoming-qos-policy + """ + + def __init__(self): + super().__init__(IncomingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'IncomingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'IncomingQosPolicy': + pass + + def __enter__(self) -> 'IncomingQosPolicy': + pass + + +class IncomingQosPolicy( + YANGContainer, + metaclass=IncomingQosPolicyMeta): + """ + YANG container handler. + + YANG name: incoming-qos-policy + """ + + _yang_name: Final[str] = 'incoming-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + IncomingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'IncomingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..49a7b3deeb46fce3abf89af50e4e3b922a00bcc5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a88123d6c81ab2c15db96d13ffa2af9458fa904e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: location + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: location + """ + + def __init__(self): + super().__init__(Location) + + def __get__(self, instance, owner=None) -> ( + 'LocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Location': + pass + + def __enter__(self) -> 'Location': + pass + + +class Location( + YANGContainer, + metaclass=LocationMeta): + """ + YANG container handler. + + YANG name: location + """ + + _yang_name: Final[str] = 'location' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Location': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..893cb264eba6e98af718d8244d262d0888793ca0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OutgoingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: outgoing-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: outgoing-qos-policy + """ + + def __init__(self): + super().__init__(OutgoingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'OutgoingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OutgoingQosPolicy': + pass + + def __enter__(self) -> 'OutgoingQosPolicy': + pass + + +class OutgoingQosPolicy( + YANGContainer, + metaclass=OutgoingQosPolicyMeta): + """ + YANG container handler. + + YANG name: outgoing-qos-policy + """ + + _yang_name: Final[str] = 'outgoing-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + OutgoingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OutgoingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fdf96f15c5ceeb7ae878052b998c9658202e04d0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a65f09fc30c0324738fdabb36a717bcfddf3496e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-monitoring + """ + + def __init__(self): + super().__init__(SdpMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'SdpMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpMonitoring': + pass + + def __enter__(self) -> 'SdpMonitoring': + pass + + +class SdpMonitoring( + YANGContainer, + metaclass=SdpMonitoringMeta): + """ + YANG container handler. + + YANG name: sdp-monitoring + """ + + _yang_name: Final[str] = 'sdp-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'incoming-utilized-bandwidth': ( + incoming_utilized_bandwidth := YANGLeafMember( + 'incoming-utilized-bandwidth', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'incoming-bw-utilization': ( + incoming_bw_utilization := YANGLeafMember( + 'incoming-bw-utilization', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'outgoing-bw-utilization': ( + outgoing_bw_utilization := YANGLeafMember( + 'outgoing-bw-utilization', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'outgoing-utilized-bandwidth': ( + outgoing_utilized_bandwidth := YANGLeafMember( + 'outgoing-utilized-bandwidth', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d745437bd534e2fa460f16fb2ca3bb982d4ce3fc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpPeeringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-peering + """ + from .protocol import Protocol + from .opaque import Opaque + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-peering + """ + + def __init__(self): + super().__init__(SdpPeering) + + def __get__(self, instance, owner=None) -> ( + 'SdpPeeringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpPeering': + pass + + def __enter__(self) -> 'SdpPeering': + pass + + +class SdpPeering( + YANGContainer, + metaclass=SdpPeeringMeta): + """ + YANG container handler. + + YANG name: sdp-peering + """ + + _yang_name: Final[str] = 'sdp-peering' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'protocol': ( + protocol := ( # YANGListMember( + SdpPeeringMeta. + Protocol. + yang_list_descriptor())), + + 'opaque': ( + opaque := ( # YANGListMember( + SdpPeeringMeta. + Opaque. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpPeering': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b367227c3d43cd31c1b3df857ed944d62d371806 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: opaque + """ + + def __init__(self): + super().__init__(Opaque) + + def __get__(self, instance, owner=None) -> ( + 'OpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Opaque']: + pass + + def __iter__(self, key) -> Iterator['Opaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'Opaque': + return super()[key] + + def __enter__(self) -> ( + 'OpaqueMeta.yang_list_descriptor'): + pass + + +class Opaque( + YANGListItem, + metaclass=OpaqueMeta): + """ + YANG list item handler. + + YANG name: opaque + """ + + _yang_name: Final[str] = 'opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-name': ( + attribute_name := YANGLeafMember( + 'attribute-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Opaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..850f7d924c02b4a89030c1a7757b1e728ad35326 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: protocol + """ + from .attribute import Attribute + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: protocol + """ + + def __init__(self): + super().__init__(Protocol) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Protocol']: + pass + + def __iter__(self, key) -> Iterator['Protocol']: + return super().__iter__() + + def __getitem__(self, key) -> 'Protocol': + return super()[key] + + def __enter__(self) -> ( + 'ProtocolMeta.yang_list_descriptor'): + pass + + +class Protocol( + YANGListItem, + metaclass=ProtocolMeta): + """ + YANG list item handler. + + YANG name: protocol + """ + + _yang_name: Final[str] = 'protocol' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'protocol-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protocol-type': ( + protocol_type := YANGLeafMember( + 'protocol-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attribute': ( + attribute := ( # YANGListMember( + ProtocolMeta. + Attribute. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Protocol': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76180637c83f2a158838bacaae99add6e9fe5b61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttributeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attribute + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attribute + """ + + def __init__(self): + super().__init__(Attribute) + + def __get__(self, instance, owner=None) -> ( + 'AttributeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Attribute']: + pass + + def __iter__(self, key) -> Iterator['Attribute']: + return super().__iter__() + + def __getitem__(self, key) -> 'Attribute': + return super()[key] + + def __enter__(self) -> ( + 'AttributeMeta.yang_list_descriptor'): + pass + + +class Attribute( + YANGListItem, + metaclass=AttributeMeta): + """ + YANG list item handler. + + YANG name: attribute + """ + + _yang_name: Final[str] = 'attribute' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-type': ( + attribute_type := YANGLeafMember( + 'attribute-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Attribute': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f39dc9971795fd83eb61a09ca7a4fea42352ac18 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceMatchCriteriaMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-match-criteria + """ + from .match_criterion import MatchCriterion + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-match-criteria + """ + + def __init__(self): + super().__init__(ServiceMatchCriteria) + + def __get__(self, instance, owner=None) -> ( + 'ServiceMatchCriteriaMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceMatchCriteria': + pass + + def __enter__(self) -> 'ServiceMatchCriteria': + pass + + +class ServiceMatchCriteria( + YANGContainer, + metaclass=ServiceMatchCriteriaMeta): + """ + YANG container handler. + + YANG name: service-match-criteria + """ + + _yang_name: Final[str] = 'service-match-criteria' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'match-criterion': ( + match_criterion := ( # YANGListMember( + ServiceMatchCriteriaMeta. + MatchCriterion. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceMatchCriteria': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99d87b7934889ec3665b1e4af12f836ec76016e0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py @@ -0,0 +1,120 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MatchCriterionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: match-criterion + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: match-criterion + """ + + def __init__(self): + super().__init__(MatchCriterion) + + def __get__(self, instance, owner=None) -> ( + 'MatchCriterionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MatchCriterion']: + pass + + def __iter__(self, key) -> Iterator['MatchCriterion']: + return super().__iter__() + + def __getitem__(self, key) -> 'MatchCriterion': + return super()[key] + + def __enter__(self) -> ( + 'MatchCriterionMeta.yang_list_descriptor'): + pass + + +class MatchCriterion( + YANGListItem, + metaclass=MatchCriterionMeta): + """ + YANG list item handler. + + YANG name: match-criterion + """ + + _yang_name: Final[str] = 'match-criterion' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'connection-group-sdp-role': ( + connection_group_sdp_role := YANGLeafMember( + 'connection-group-sdp-role', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'target-connection-group-id': ( + target_connection_group_id := YANGLeafMember( + 'target-connection-group-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'target-connectivity-construct-id': ( + target_connectivity_construct_id := YANGLeafMember( + 'target-connectivity-construct-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'match-type': ( + match_type := YANGLeafMember( + 'match-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MatchCriterion': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f802183296df337e7ebacca0d3290f433341130d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: status + """ + from .oper_status import OperStatus + from .admin_status import AdminStatus + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: status + """ + + def __init__(self): + super().__init__(Status) + + def __get__(self, instance, owner=None) -> ( + 'StatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Status': + pass + + def __enter__(self) -> 'Status': + pass + + +class Status( + YANGContainer, + metaclass=StatusMeta): + """ + YANG container handler. + + YANG name: status + """ + + _yang_name: Final[str] = 'status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'oper-status': ( + oper_status := ( # YANGContainerMember( + StatusMeta. + OperStatus. + yang_container_descriptor())), + + 'admin-status': ( + admin_status := ( # YANGContainerMember( + StatusMeta. + AdminStatus. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Status': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5581ef12dac29ce3050652c8c969a76f0ac88fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AdminStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: admin-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: admin-status + """ + + def __init__(self): + super().__init__(AdminStatus) + + def __get__(self, instance, owner=None) -> ( + 'AdminStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AdminStatus': + pass + + def __enter__(self) -> 'AdminStatus': + pass + + +class AdminStatus( + YANGContainer, + metaclass=AdminStatusMeta): + """ + YANG container handler. + + YANG name: admin-status + """ + + _yang_name: Final[str] = 'admin-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AdminStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ab3508c5b8babc01483e2d3a2e2996481a28ef43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OperStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: oper-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: oper-status + """ + + def __init__(self): + super().__init__(OperStatus) + + def __get__(self, instance, owner=None) -> ( + 'OperStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OperStatus': + pass + + def __enter__(self) -> 'OperStatus': + pass + + +class OperStatus( + YANGContainer, + metaclass=OperStatusMeta): + """ + YANG container handler. + + YANG name: oper-status + """ + + _yang_name: Final[str] = 'oper-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OperStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fceafd62985c5230276d129779bf35378d84e87d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceTagsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-tags + """ + from .tag_opaque import TagOpaque + from .tag_type import TagType + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-tags + """ + + def __init__(self): + super().__init__(ServiceTags) + + def __get__(self, instance, owner=None) -> ( + 'ServiceTagsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceTags': + pass + + def __enter__(self) -> 'ServiceTags': + pass + + +class ServiceTags( + YANGContainer, + metaclass=ServiceTagsMeta): + """ + YANG container handler. + + YANG name: service-tags + """ + + _yang_name: Final[str] = 'service-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tag-opaque': ( + tag_opaque := ( # YANGListMember( + ServiceTagsMeta. + TagOpaque. + yang_list_descriptor())), + + 'tag-type': ( + tag_type := ( # YANGListMember( + ServiceTagsMeta. + TagType. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d40d27cb705b0fbf4970fa215054e46b4743d885 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TagOpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tag-opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tag-opaque + """ + + def __init__(self): + super().__init__(TagOpaque) + + def __get__(self, instance, owner=None) -> ( + 'TagOpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TagOpaque']: + pass + + def __iter__(self, key) -> Iterator['TagOpaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'TagOpaque': + return super()[key] + + def __enter__(self) -> ( + 'TagOpaqueMeta.yang_list_descriptor'): + pass + + +class TagOpaque( + YANGListItem, + metaclass=TagOpaqueMeta): + """ + YANG list item handler. + + YANG name: tag-opaque + """ + + _yang_name: Final[str] = 'tag-opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-name': ( + tag_name := YANGLeafMember( + 'tag-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TagOpaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4fff2c3b44b9e1649b5eabb6b12cb36d376b6e1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TagTypeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tag-type + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tag-type + """ + + def __init__(self): + super().__init__(TagType) + + def __get__(self, instance, owner=None) -> ( + 'TagTypeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TagType']: + pass + + def __iter__(self, key) -> Iterator['TagType']: + return super().__iter__() + + def __getitem__(self, key) -> 'TagType': + return super()[key] + + def __enter__(self) -> ( + 'TagTypeMeta.yang_list_descriptor'): + pass + + +class TagType( + YANGListItem, + metaclass=TagTypeMeta): + """ + YANG list item handler. + + YANG name: tag-type + """ + + _yang_name: Final[str] = 'tag-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-type': ( + tag_type := YANGLeafMember( + 'tag-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TagType': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f20900d5bafe087db15381e30cca8d6c7555875c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .steering_constraints import SteeringConstraints + from .metric_bounds import MetricBounds + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0cd58260dfa621982847da9dc6fd2bfd5c74331b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c308b850384ee650e0ea222b7776b52b378718fd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .path_constraints import PathConstraints + from .service_function import ServiceFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4239eb7df15eb9629be735267d4fb31ae46af03 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: status + """ + from .admin_status import AdminStatus + from .oper_status import OperStatus + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: status + """ + + def __init__(self): + super().__init__(Status) + + def __get__(self, instance, owner=None) -> ( + 'StatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Status': + pass + + def __enter__(self) -> 'Status': + pass + + +class Status( + YANGContainer, + metaclass=StatusMeta): + """ + YANG container handler. + + YANG name: status + """ + + _yang_name: Final[str] = 'status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'admin-status': ( + admin_status := ( # YANGContainerMember( + StatusMeta. + AdminStatus. + yang_container_descriptor())), + + 'oper-status': ( + oper_status := ( # YANGContainerMember( + StatusMeta. + OperStatus. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Status': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5581ef12dac29ce3050652c8c969a76f0ac88fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AdminStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: admin-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: admin-status + """ + + def __init__(self): + super().__init__(AdminStatus) + + def __get__(self, instance, owner=None) -> ( + 'AdminStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AdminStatus': + pass + + def __enter__(self) -> 'AdminStatus': + pass + + +class AdminStatus( + YANGContainer, + metaclass=AdminStatusMeta): + """ + YANG container handler. + + YANG name: admin-status + """ + + _yang_name: Final[str] = 'admin-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AdminStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69e53ef62d967bc5dbd072cf4f405d60c28be30 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OperStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: oper-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: oper-status + """ + + def __init__(self): + super().__init__(OperStatus) + + def __get__(self, instance, owner=None) -> ( + 'OperStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OperStatus': + pass + + def __enter__(self) -> 'OperStatus': + pass + + +class OperStatus( + YANGContainer, + metaclass=OperStatusMeta): + """ + YANG container handler. + + YANG name: oper-status + """ + + _yang_name: Final[str] = 'oper-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OperStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b76cce7a32018d0f77c2a9ac3c7fbbc94665680f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyIdentifierMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology-identifier + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology-identifier + """ + + def __init__(self): + super().__init__(TeTopologyIdentifier) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyIdentifierMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopologyIdentifier': + pass + + def __enter__(self) -> 'TeTopologyIdentifier': + pass + + +class TeTopologyIdentifier( + YANGContainer, + metaclass=TeTopologyIdentifierMeta): + """ + YANG container handler. + + YANG name: te-topology-identifier + """ + + _yang_name: Final[str] = 'te-topology-identifier' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'client-id': ( + client_id := YANGLeafMember( + 'client-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'topology-id': ( + topology_id := YANGLeafMember( + 'topology-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'provider-id': ( + provider_id := YANGLeafMember( + 'provider-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopologyIdentifier': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..27cda68070b24236354d46b094d0ad3787ab4485 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSleTemplatesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: slo-sle-templates + """ + from .slo_sle_template import SloSleTemplate + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: slo-sle-templates + """ + + def __init__(self): + super().__init__(SloSleTemplates) + + def __get__(self, instance, owner=None) -> ( + 'SloSleTemplatesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SloSleTemplates': + pass + + def __enter__(self) -> 'SloSleTemplates': + pass + + +class SloSleTemplates( + YANGContainer, + metaclass=SloSleTemplatesMeta): + """ + YANG container handler. + + YANG name: slo-sle-templates + """ + + _yang_name: Final[str] = 'slo-sle-templates' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'slo-sle-template': ( + slo_sle_template := ( # YANGListMember( + SloSleTemplatesMeta. + SloSleTemplate. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SloSleTemplates': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e97edc736f2f5435711ad71a78313fa2f98b446b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSleTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: slo-sle-template + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: slo-sle-template + """ + + def __init__(self): + super().__init__(SloSleTemplate) + + def __get__(self, instance, owner=None) -> ( + 'SloSleTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SloSleTemplate']: + pass + + def __iter__(self, key) -> Iterator['SloSleTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'SloSleTemplate': + return super()[key] + + def __enter__(self) -> ( + 'SloSleTemplateMeta.yang_list_descriptor'): + pass + + +class SloSleTemplate( + YANGListItem, + metaclass=SloSleTemplateMeta): + """ + YANG list item handler. + + YANG name: slo-sle-template + """ + + _yang_name: Final[str] = 'slo-sle-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'template-ref': ( + template_ref := YANGLeafMember( + 'template-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'template-description': ( + template_description := YANGLeafMember( + 'template-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + SloSleTemplateMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SloSleTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6992f5bf7f3fc87ff009bcf075de2cf2cd698f12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2664a9278a5332d04479df4c5026f38ec2f379d9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..55faa977ba04330042964cb79ab2a3bdd8a6571c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: networks + """ + from .te import Te + from .network import Network + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: networks + """ + + def __init__(self): + super().__init__(Networks) + + def __get__(self, instance, owner=None) -> ( + 'NetworksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Networks': + pass + + def __enter__(self) -> 'Networks': + pass + + +class Networks( + YANGContainer, + metaclass=NetworksMeta): + """ + YANG container handler. + + YANG name: networks + """ + + _yang_name: Final[str] = 'networks' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NetworksMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'network': ( + network := ( # YANGListMember( + NetworksMeta. + Network. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Networks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..44952bf764009ce37b74d8ab45cf20dc0e0e450e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py @@ -0,0 +1,138 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: network + """ + from .te import Te + from .te_topology_identifier import TeTopologyIdentifier + from .network_types import NetworkTypes + from .node import Node + from .supporting_network import SupportingNetwork + from .link import Link + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: network + """ + + def __init__(self): + super().__init__(Network) + + def __get__(self, instance, owner=None) -> ( + 'NetworkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Network']: + pass + + def __iter__(self, key) -> Iterator['Network']: + return super().__iter__() + + def __getitem__(self, key) -> 'Network': + return super()[key] + + def __enter__(self) -> ( + 'NetworkMeta.yang_list_descriptor'): + pass + + +class Network( + YANGListItem, + metaclass=NetworkMeta): + """ + YANG list item handler. + + YANG name: network + """ + + _yang_name: Final[str] = 'network' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-id': ( + network_id := YANGLeafMember( + 'network-id', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NetworkMeta. + Te. + yang_container_descriptor())), + + 'te-topology-identifier': ( + te_topology_identifier := ( # YANGContainerMember( + NetworkMeta. + TeTopologyIdentifier. + yang_container_descriptor())), + + 'network-types': ( + network_types := ( # YANGContainerMember( + NetworkMeta. + NetworkTypes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'node': ( + node := ( # YANGListMember( + NetworkMeta. + Node. + yang_list_descriptor())), + + 'supporting-network': ( + supporting_network := ( # YANGListMember( + NetworkMeta. + SupportingNetwork. + yang_list_descriptor())), + + 'link': ( + link := ( # YANGListMember( + NetworkMeta. + Link. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Network': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3efc3e1518f16330422d43ba925ea7713a2cef25 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py @@ -0,0 +1,124 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: link + """ + from .source import Source + from .destination import Destination + from .te import Te + from .supporting_link import SupportingLink + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: link + """ + + def __init__(self): + super().__init__(Link) + + def __get__(self, instance, owner=None) -> ( + 'LinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Link']: + pass + + def __iter__(self, key) -> Iterator['Link']: + return super().__iter__() + + def __getitem__(self, key) -> 'Link': + return super()[key] + + def __enter__(self) -> ( + 'LinkMeta.yang_list_descriptor'): + pass + + +class Link( + YANGListItem, + metaclass=LinkMeta): + """ + YANG list item handler. + + YANG name: link + """ + + _yang_name: Final[str] = 'link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'link-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-id': ( + link_id := YANGLeafMember( + 'link-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'source': ( + source := ( # YANGContainerMember( + LinkMeta. + Source. + yang_container_descriptor())), + + 'destination': ( + destination := ( # YANGContainerMember( + LinkMeta. + Destination. + yang_container_descriptor())), + + 'te': ( + te := ( # YANGContainerMember( + LinkMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-link': ( + supporting_link := ( # YANGListMember( + LinkMeta. + SupportingLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Link': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..387af3071c585daebb4f11cb2bc7890a37967e56 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class DestinationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: destination + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: destination + """ + + def __init__(self): + super().__init__(Destination) + + def __get__(self, instance, owner=None) -> ( + 'DestinationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Destination': + pass + + def __enter__(self) -> 'Destination': + pass + + +class Destination( + YANGContainer, + metaclass=DestinationMeta): + """ + YANG container handler. + + YANG name: destination + """ + + _yang_name: Final[str] = 'destination' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'dest-node': ( + dest_node := YANGLeafMember( + 'dest-node', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'dest-tp': ( + dest_tp := YANGLeafMember( + 'dest-tp', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Destination': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f1ea95f113d40f596ea39edaa5d1b07273f22148 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SourceMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: source + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: source + """ + + def __init__(self): + super().__init__(Source) + + def __get__(self, instance, owner=None) -> ( + 'SourceMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Source': + pass + + def __enter__(self) -> 'Source': + pass + + +class Source( + YANGContainer, + metaclass=SourceMeta): + """ + YANG container handler. + + YANG name: source + """ + + _yang_name: Final[str] = 'source' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source-tp': ( + source_tp := YANGLeafMember( + 'source-tp', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'source-node': ( + source_node := YANGLeafMember( + 'source-node', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Source': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dc99caa282f1b3c61577107a169430654949fe3f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-link + """ + + def __init__(self): + super().__init__(SupportingLink) + + def __get__(self, instance, owner=None) -> ( + 'SupportingLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingLink']: + pass + + def __iter__(self, key) -> Iterator['SupportingLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingLink': + return super()[key] + + def __enter__(self) -> ( + 'SupportingLinkMeta.yang_list_descriptor'): + pass + + +class SupportingLink( + YANGListItem, + metaclass=SupportingLinkMeta): + """ + YANG list item handler. + + YANG name: supporting-link + """ + + _yang_name: Final[str] = 'supporting-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'link-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2fac1a941b3f2b45da7b78f3f4eef6cace58f3b5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py @@ -0,0 +1,155 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .statistics import Statistics + from .te_link_attributes import TeLinkAttributes + from .underlay import Underlay + from .recovery import Recovery + from .information_source_state import InformationSourceState + from .information_source_entry import InformationSourceEntry + from .bundle_stack_level import BundleStackLevel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-transitional': ( + is_transitional := YANGLeafMember( + 'is-transitional', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'statistics': ( + statistics := ( # YANGContainerMember( + TeMeta. + Statistics. + yang_container_descriptor())), + + 'te-link-attributes': ( + te_link_attributes := ( # YANGContainerMember( + TeMeta. + TeLinkAttributes. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeMeta. + Underlay. + yang_container_descriptor())), + + 'recovery': ( + recovery := ( # YANGContainerMember( + TeMeta. + Recovery. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + TeMeta. + InformationSourceState. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'information-source-entry': ( + information_source_entry := ( # YANGListMember( + TeMeta. + InformationSourceEntry. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + + 'bundle-stack-level': + TeMeta.BundleStackLevel( + instance), + } + return instance + + @property + def bundle_stack_level(self) -> ( + TeMeta.BundleStackLevel): + return self._yang_choices['bundle-stack-level'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..225c39aa448d3165a61a66735cb5755c9eaa4908 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundleStackLevelMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: bundle-stack-level + """ + + from .component import Component + from .bundle import Bundle + + class component_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: component + """ + + def __init__(self): + super().__init__( + BundleStackLevelMeta.Component) + + def __get__(self, instance, owner=None) -> ( + 'BundleStackLevelMeta.component_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'BundleStackLevelMeta.Component'): + pass + + def __enter__(self) -> ( + 'BundleStackLevelMeta.Component'): + pass + + class bundle_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: bundle + """ + + def __init__(self): + super().__init__( + BundleStackLevelMeta.Bundle) + + def __get__(self, instance, owner=None) -> ( + 'BundleStackLevelMeta.bundle_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'BundleStackLevelMeta.Bundle'): + pass + + def __enter__(self) -> ( + 'BundleStackLevelMeta.Bundle'): + pass + + +class BundleStackLevel(YANGChoice, metaclass=BundleStackLevelMeta): + """ + YANG choice handler. + + YANG name: bundle-stack-level + """ + + _yang_name: Final[str] = 'bundle-stack-level' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'component': ( + component := ( # YANGChoiceCase( + BundleStackLevelMeta. + component_case_descriptor())), + + 'bundle': ( + bundle := ( # YANGChoiceCase( + BundleStackLevelMeta. + bundle_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ac76501adeb07f82ad08b8084a64534cca4a163 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundleMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: bundle + """ + from .bundled_links import BundledLinks + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: bundle + """ + + def __init__(self): + super().__init__(Bundle) + + def __get__(self, instance, owner=None) -> ( + 'BundleMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Bundle': + pass + + def __enter__(self) -> 'Bundle': + pass + + +class Bundle( + YANGContainer, + metaclass=BundleMeta): + """ + YANG container handler. + + YANG name: bundle + """ + + _yang_name: Final[str] = 'bundle' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'bundled-links': ( + bundled_links := ( # YANGContainerMember( + BundleMeta. + BundledLinks. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Bundle': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fc2b9edfb5c0d0a12233c23e4b0982fc72020ae0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundledLinksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: bundled-links + """ + from .bundled_link import BundledLink + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: bundled-links + """ + + def __init__(self): + super().__init__(BundledLinks) + + def __get__(self, instance, owner=None) -> ( + 'BundledLinksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'BundledLinks': + pass + + def __enter__(self) -> 'BundledLinks': + pass + + +class BundledLinks( + YANGContainer, + metaclass=BundledLinksMeta): + """ + YANG container handler. + + YANG name: bundled-links + """ + + _yang_name: Final[str] = 'bundled-links' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'bundled-link': ( + bundled_link := ( # YANGListMember( + BundledLinksMeta. + BundledLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BundledLinks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b10b2d452b813e8821571384ff36553830cea9b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py @@ -0,0 +1,108 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundledLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: bundled-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: bundled-link + """ + + def __init__(self): + super().__init__(BundledLink) + + def __get__(self, instance, owner=None) -> ( + 'BundledLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BundledLink']: + pass + + def __iter__(self, key) -> Iterator['BundledLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'BundledLink': + return super()[key] + + def __enter__(self) -> ( + 'BundledLinkMeta.yang_list_descriptor'): + pass + + +class BundledLink( + YANGListItem, + metaclass=BundledLinkMeta): + """ + YANG list item handler. + + YANG name: bundled-link + """ + + _yang_name: Final[str] = 'bundled-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sequence', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sequence': ( + sequence := YANGLeafMember( + 'sequence', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'src-tp-ref': ( + src_tp_ref := YANGLeafMember( + 'src-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'des-tp-ref': ( + des_tp_ref := YANGLeafMember( + 'des-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BundledLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8cd4a23746aa284e47784cb4fccdf7278ebce34 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: component + """ + from .component_links import ComponentLinks + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: component + """ + + def __init__(self): + super().__init__(Component) + + def __get__(self, instance, owner=None) -> ( + 'ComponentMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Component': + pass + + def __enter__(self) -> 'Component': + pass + + +class Component( + YANGContainer, + metaclass=ComponentMeta): + """ + YANG container handler. + + YANG name: component + """ + + _yang_name: Final[str] = 'component' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'component-links': ( + component_links := ( # YANGContainerMember( + ComponentMeta. + ComponentLinks. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Component': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2dea8fc98c2766683324fb1271d8adb121b4dea8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentLinksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: component-links + """ + from .component_link import ComponentLink + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: component-links + """ + + def __init__(self): + super().__init__(ComponentLinks) + + def __get__(self, instance, owner=None) -> ( + 'ComponentLinksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ComponentLinks': + pass + + def __enter__(self) -> 'ComponentLinks': + pass + + +class ComponentLinks( + YANGContainer, + metaclass=ComponentLinksMeta): + """ + YANG container handler. + + YANG name: component-links + """ + + _yang_name: Final[str] = 'component-links' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'component-link': ( + component_link := ( # YANGListMember( + ComponentLinksMeta. + ComponentLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ComponentLinks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6195320b1b05440e98cb09c672a9286f7ac08017 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py @@ -0,0 +1,108 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: component-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: component-link + """ + + def __init__(self): + super().__init__(ComponentLink) + + def __get__(self, instance, owner=None) -> ( + 'ComponentLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ComponentLink']: + pass + + def __iter__(self, key) -> Iterator['ComponentLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'ComponentLink': + return super()[key] + + def __enter__(self) -> ( + 'ComponentLinkMeta.yang_list_descriptor'): + pass + + +class ComponentLink( + YANGListItem, + metaclass=ComponentLinkMeta): + """ + YANG list item handler. + + YANG name: component-link + """ + + _yang_name: Final[str] = 'component-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sequence', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'src-interface-ref': ( + src_interface_ref := YANGLeafMember( + 'src-interface-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sequence': ( + sequence := YANGLeafMember( + 'sequence', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'des-interface-ref': ( + des_interface_ref := YANGLeafMember( + 'des-interface-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ComponentLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aacb98f85b2ac241f3599daa93b27fc0f520c8ff --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py @@ -0,0 +1,195 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceEntryMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: information-source-entry + """ + from .max_link_bandwidth import MaxLinkBandwidth + from .label_restrictions import LabelRestrictions + from .information_source_state import InformationSourceState + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .te_srlgs import TeSrlgs + from .te_nsrlgs import TeNsrlgs + from .interface_switching_capability import InterfaceSwitchingCapability + from .unreserved_bandwidth import UnreservedBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: information-source-entry + """ + + def __init__(self): + super().__init__(InformationSourceEntry) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InformationSourceEntry']: + pass + + def __iter__(self, key) -> Iterator['InformationSourceEntry']: + return super().__iter__() + + def __getitem__(self, key) -> 'InformationSourceEntry': + return super()[key] + + def __enter__(self) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + pass + + +class InformationSourceEntry( + YANGListItem, + metaclass=InformationSourceEntryMeta): + """ + YANG list item handler. + + YANG name: information-source-entry + """ + + _yang_name: Final[str] = 'information-source-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'information-source', + 'information-source-instance', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + InformationSourceEntryMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + InformationSourceEntryMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + InformationSourceEntryMeta. + InformationSourceState. + yang_container_descriptor())), + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + InformationSourceEntryMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + InformationSourceEntryMeta. + TeSrlgs. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + InformationSourceEntryMeta. + TeNsrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + InformationSourceEntryMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + InformationSourceEntryMeta. + UnreservedBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26d315f6a43287274e5b410c83c64a950c07014d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63598ce3305f3b8b540d2d10d31cf66604ea175c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42361e143910d3dc4963a100c961f548c4740f4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f85292e3a5a398b30f523c488c31588fc79925c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_step import LabelStep + from .label_end import LabelEnd + from .label_start import LabelStart + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..91fd095ce45cdfe4669215874ed2aeabfc57b835 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63598ce3305f3b8b540d2d10d31cf66604ea175c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ecaf0b0c27bf56b948e42a76356e755c71ebf360 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RecoveryMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: recovery + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: recovery + """ + + def __init__(self): + super().__init__(Recovery) + + def __get__(self, instance, owner=None) -> ( + 'RecoveryMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Recovery': + pass + + def __enter__(self) -> 'Recovery': + pass + + +class Recovery( + YANGContainer, + metaclass=RecoveryMeta): + """ + YANG container handler. + + YANG name: recovery + """ + + _yang_name: Final[str] = 'recovery' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restoration-status': ( + restoration_status := YANGLeafMember( + 'restoration-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-status': ( + protection_status := YANGLeafMember( + 'protection-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Recovery': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08e82ba9e2412515916a0d1c4aeb8cb819cf7ba8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py @@ -0,0 +1,187 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'fault-detects': ( + fault_detects := YANGLeafMember( + 'fault-detects', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-failures': ( + restoration_failures := YANGLeafMember( + 'restoration-failures', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-switches': ( + protection_switches := YANGLeafMember( + 'protection-switches', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'downs': ( + downs := YANGLeafMember( + 'downs', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-successes': ( + restoration_successes := YANGLeafMember( + 'restoration-successes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-starts': ( + restoration_reversion_starts := YANGLeafMember( + 'restoration-reversion-starts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-reverts': ( + protection_reverts := YANGLeafMember( + 'protection-reverts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-successes': ( + restoration_reversion_successes := YANGLeafMember( + 'restoration-reversion-successes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'ups': ( + ups := YANGLeafMember( + 'ups', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-starts': ( + restoration_starts := YANGLeafMember( + 'restoration-starts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'fault-clears': ( + fault_clears := YANGLeafMember( + 'fault-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-failures': ( + restoration_reversion_failures := YANGLeafMember( + 'restoration-reversion-failures', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..706a755fae50b2e463f93632ba44e2dafcf21661 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py @@ -0,0 +1,202 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLinkAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-link-attributes + """ + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .max_link_bandwidth import MaxLinkBandwidth + from .underlay import Underlay + from .te_srlgs import TeSrlgs + from .label_restrictions import LabelRestrictions + from .external_domain import ExternalDomain + from .te_nsrlgs import TeNsrlgs + from .unreserved_bandwidth import UnreservedBandwidth + from .interface_switching_capability import InterfaceSwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-link-attributes + """ + + def __init__(self): + super().__init__(TeLinkAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeLinkAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLinkAttributes': + pass + + def __enter__(self) -> 'TeLinkAttributes': + pass + + +class TeLinkAttributes( + YANGContainer, + metaclass=TeLinkAttributesMeta): + """ + YANG container handler. + + YANG name: te-link-attributes + """ + + _yang_name: Final[str] = 'te-link-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'access-type': ( + access_type := YANGLeafMember( + 'access-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeLinkAttributesMeta. + Underlay. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeSrlgs. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + TeLinkAttributesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'external-domain': ( + external_domain := ( # YANGContainerMember( + TeLinkAttributesMeta. + ExternalDomain. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeNsrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + TeLinkAttributesMeta. + UnreservedBandwidth. + yang_list_descriptor())), + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeLinkAttributesMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLinkAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58a1d9d4dcf0f87fa40fddfc379b3245219a8ef0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExternalDomainMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: external-domain + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: external-domain + """ + + def __init__(self): + super().__init__(ExternalDomain) + + def __get__(self, instance, owner=None) -> ( + 'ExternalDomainMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExternalDomain': + pass + + def __enter__(self) -> 'ExternalDomain': + pass + + +class ExternalDomain( + YANGContainer, + metaclass=ExternalDomainMeta): + """ + YANG container handler. + + YANG name: external-domain + """ + + _yang_name: Final[str] = 'external-domain' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'remote-te-node-id': ( + remote_te_node_id := YANGLeafMember( + 'remote-te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-link-tp-id': ( + remote_te_link_tp_id := YANGLeafMember( + 'remote-te-link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExternalDomain': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42361e143910d3dc4963a100c961f548c4740f4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a396a20af1746df44dc4e4f479436fde2d35e17 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95deb32ec877a103436ef7b54fd1a23501216fab --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6792cd8e4b1e1a843abf183eea400e13dbb78be --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ea01121d057b002c61d31fe6f49e50049c04b952 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'dynamic': ( + dynamic := YANGLeafMember( + 'dynamic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'committed': ( + committed := YANGLeafMember( + 'committed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0fb174b74c14bff912498e9c690c949d93d2b76b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkTypesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: network-types + """ + from .te_topology import TeTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: network-types + """ + + def __init__(self): + super().__init__(NetworkTypes) + + def __get__(self, instance, owner=None) -> ( + 'NetworkTypesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NetworkTypes': + pass + + def __enter__(self) -> 'NetworkTypes': + pass + + +class NetworkTypes( + YANGContainer, + metaclass=NetworkTypesMeta): + """ + YANG container handler. + + YANG name: network-types + """ + + _yang_name: Final[str] = 'network-types' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-topology': ( + te_topology := ( # YANGContainerMember( + NetworkTypesMeta. + TeTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NetworkTypes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d41731af61cc5a91e1178ed27ff7a5634149f15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology + """ + + def __init__(self): + super().__init__(TeTopology) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopology': + pass + + def __enter__(self) -> 'TeTopology': + pass + + +class TeTopology( + YANGContainer, + metaclass=TeTopologyMeta): + """ + YANG container handler. + + YANG name: te-topology + """ + + _yang_name: Final[str] = 'te-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c6a31d9a0e3b49286b2df219900fc10df3c39c56 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py @@ -0,0 +1,123 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: node + """ + from .te import Te + from .termination_point import TerminationPoint + from .supporting_node import SupportingNode + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: node + """ + + def __init__(self): + super().__init__(Node) + + def __get__(self, instance, owner=None) -> ( + 'NodeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Node']: + pass + + def __iter__(self, key) -> Iterator['Node']: + return super().__iter__() + + def __getitem__(self, key) -> 'Node': + return super()[key] + + def __enter__(self) -> ( + 'NodeMeta.yang_list_descriptor'): + pass + + +class Node( + YANGListItem, + metaclass=NodeMeta): + """ + YANG list item handler. + + YANG name: node + """ + + _yang_name: Final[str] = 'node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'node-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-node-id': ( + te_node_id := YANGLeafMember( + 'te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NodeMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'termination-point': ( + termination_point := ( # YANGListMember( + NodeMeta. + TerminationPoint. + yang_list_descriptor())), + + 'supporting-node': ( + supporting_node := ( # YANGListMember( + NodeMeta. + SupportingNode. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Node': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abeb4a984b9b0c939ae51217ac7144f568841550 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingNodeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-node + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-node + """ + + def __init__(self): + super().__init__(SupportingNode) + + def __get__(self, instance, owner=None) -> ( + 'SupportingNodeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingNode']: + pass + + def __iter__(self, key) -> Iterator['SupportingNode']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingNode': + return super()[key] + + def __enter__(self) -> ( + 'SupportingNodeMeta.yang_list_descriptor'): + pass + + +class SupportingNode( + YANGListItem, + metaclass=SupportingNodeMeta): + """ + YANG list item handler. + + YANG name: supporting-node + """ + + _yang_name: Final[str] = 'supporting-node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'node-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingNode': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ad66ed994421c34ac0e36ef0189e6f5a21b646f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py @@ -0,0 +1,145 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .statistics import Statistics + from .geolocation import Geolocation + from .te_node_attributes import TeNodeAttributes + from .information_source_state import InformationSourceState + from .tunnel_termination_point import TunnelTerminationPoint + from .information_source_entry import InformationSourceEntry + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-multi-access-dr': ( + is_multi_access_dr := YANGLeafMember( + 'is-multi-access-dr', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'statistics': ( + statistics := ( # YANGContainerMember( + TeMeta. + Statistics. + yang_container_descriptor())), + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + + 'te-node-attributes': ( + te_node_attributes := ( # YANGContainerMember( + TeMeta. + TeNodeAttributes. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + TeMeta. + InformationSourceState. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel-termination-point': ( + tunnel_termination_point := ( # YANGListMember( + TeMeta. + TunnelTerminationPoint. + yang_list_descriptor())), + + 'information-source-entry': ( + information_source_entry := ( # YANGListMember( + TeMeta. + InformationSourceEntry. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a631c3553d9ab5ce7b22b799dbf338a0f87fa43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21bfe84df044875786766febf0915d7c70737106 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py @@ -0,0 +1,142 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceEntryMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: information-source-entry + """ + from .information_source_state import InformationSourceState + from .underlay_topology import UnderlayTopology + from .connectivity_matrices import ConnectivityMatrices + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: information-source-entry + """ + + def __init__(self): + super().__init__(InformationSourceEntry) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InformationSourceEntry']: + pass + + def __iter__(self, key) -> Iterator['InformationSourceEntry']: + return super().__iter__() + + def __getitem__(self, key) -> 'InformationSourceEntry': + return super()[key] + + def __enter__(self) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + pass + + +class InformationSourceEntry( + YANGListItem, + metaclass=InformationSourceEntryMeta): + """ + YANG list item handler. + + YANG name: information-source-entry + """ + + _yang_name: Final[str] = 'information-source-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'information-source', + 'information-source-instance', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + InformationSourceEntryMeta. + InformationSourceState. + yang_container_descriptor())), + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + InformationSourceEntryMeta. + UnderlayTopology. + yang_container_descriptor())), + + 'connectivity-matrices': ( + connectivity_matrices := ( # YANGContainerMember( + InformationSourceEntryMeta. + ConnectivityMatrices. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08c000d9b26dfa8e9c926a9ef5705a9e9fa0fa31 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatricesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrices + """ + from .path_properties import PathProperties + from .path_constraints import PathConstraints + from .optimizations import Optimizations + from .underlay import Underlay + from .label_restrictions import LabelRestrictions + from .connectivity_matrix import ConnectivityMatrix + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrices + """ + + def __init__(self): + super().__init__(ConnectivityMatrices) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatricesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrices': + pass + + def __enter__(self) -> 'ConnectivityMatrices': + pass + + +class ConnectivityMatrices( + YANGContainer, + metaclass=ConnectivityMatricesMeta): + """ + YANG container handler. + + YANG name: connectivity-matrices + """ + + _yang_name: Final[str] = 'connectivity-matrices' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathConstraints. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Optimizations. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Underlay. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ConnectivityMatricesMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-matrix': ( + connectivity_matrix := ( # YANGListMember( + ConnectivityMatricesMeta. + ConnectivityMatrix. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc57f620463762241042a9afbb5d5fa46368dc55 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,144 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-matrix + """ + from .to import To + from .underlay import Underlay + from .path_properties import PathProperties + from .optimizations import Optimizations + from .from import From + from .path_constraints import PathConstraints + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-matrix + """ + + def __init__(self): + super().__init__(ConnectivityMatrix) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityMatrix']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityMatrix']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityMatrix': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + pass + + +class ConnectivityMatrix( + YANGListItem, + metaclass=ConnectivityMatrixMeta): + """ + YANG list item handler. + + YANG name: connectivity-matrix + """ + + _yang_name: Final[str] = 'connectivity-matrix' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'to': ( + to := ( # YANGContainerMember( + ConnectivityMatrixMeta. + To. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Underlay. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathProperties. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Optimizations. + yang_container_descriptor())), + + 'from': ( + from := ( # YANGContainerMember( + ConnectivityMatrixMeta. + From. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrix': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14cbae7304f9e1b80e18a1547974269f00b66621 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class FromMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: from + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: from + """ + + def __init__(self): + super().__init__(From) + + def __get__(self, instance, owner=None) -> ( + 'FromMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'From': + pass + + def __enter__(self) -> 'From': + pass + + +class From( + YANGContainer, + metaclass=FromMeta): + """ + YANG container handler. + + YANG name: from + """ + + _yang_name: Final[str] = 'from' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + FromMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'From': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..86c3a10ff67557b730c7883f68f60a5220014139 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b3f85a0993ca8184c4cec6a891f373b0666767 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e00223044020f31fddaff4d0a41e5b5c2c7181bc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .srlg import Srlg + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99085dad5868ea8d4f63c188ccd69653b0d7a1d4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .as_number import AsNumber + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b473367cc49ea6b9b116af98e3d25cf058f70ffc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .te_bandwidth import TeBandwidth + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76541b227cefa1dca289ff8b4cc6350032acc02f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_route_objects import PathRouteObjects + from .path_srlgs_names import PathSrlgsNames + from .path_srlgs_lists import PathSrlgsLists + from .path_affinities_values import PathAffinitiesValues + from .path_affinity_names import PathAffinityNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8bc2d82e13718733c4ed76acde67b8508071d571 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d03118f5c94e3726341c4332447847c61623d616 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ToMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: to + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: to + """ + + def __init__(self): + super().__init__(To) + + def __get__(self, instance, owner=None) -> ( + 'ToMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'To': + pass + + def __enter__(self) -> 'To': + pass + + +class To( + YANGContainer, + metaclass=ToMeta): + """ + YANG container handler. + + YANG name: to + """ + + _yang_name: Final[str] = 'to' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ToMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'To': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..61cb67d4bdc9682e1228c9cb9ddfb86817c96f62 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2feb9b8f1d3512055ea66c91d1dfc9059e8cf901 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..077e86df002f4bbdf6f8b1a9767746e1493b8fc4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..00c674167360cd2724dd7263e34c54dbb27dbccb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a2076e54c3ca2f4e75844db6a7ca736e6a1cc6ce --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e568286bdabfa9cd970ff66b3e9b6a807b0f31f3 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32c30d13361c09cf5f2a51b8e1e645103a430a6a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_step import LabelStep + from .label_start import LabelStart + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bad2331fc0f109b98bda93287a822244302b5d1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8411b9056a87031a8a5453bd7ef0d46324215a2f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .srlg import Srlg + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8837ea16f120b8d9f40ee5099f46294b6ab79579 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70317d31c9d8ee9d772e58c135569168cf8843f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .label import Label + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aa5135a1afed60270d2606ad4c7ad19b66f70d7c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b600b1aeaf464f293a697c09c163096f730379f2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .te_bandwidth import TeBandwidth + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e72a44fd364b7d9238cef98eba888090a23f76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..149786798cff216d2d5c3159b457969263950a72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..535505eea9d601de2d3ee70ab7061cbcf2e35bc8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8e113b567402f37aecdf644dae003b86cc8bb4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac722c47add5d381fef94d2c3a2f5750b49a2688 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .primary_path import PrimaryPath + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3762dccee93d6c5fc548fea761a80e03cd0398d6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..00c674167360cd2724dd7263e34c54dbb27dbccb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1ab68ff674ea58adde5a644c74609928fe6f874 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_link_hop import NumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c909481cb8745c1895e9d6bcb7fb53fa10296f40 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26d315f6a43287274e5b410c83c64a950c07014d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e09ccdff8c5f951521b350308c3922079bad836 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6d2edeb71cbf031bc1516862b7175c9ed004e9a0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e09ccdff8c5f951521b350308c3922079bad836 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5c42b5a651c746140109908a98c5d411f7b354b4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py @@ -0,0 +1,99 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + from .node import Node + from .connectivity_matrix_entry import ConnectivityMatrixEntry + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'node': ( + node := ( # YANGContainerMember( + StatisticsMeta. + Node. + yang_container_descriptor())), + + 'connectivity-matrix-entry': ( + connectivity_matrix_entry := ( # YANGContainerMember( + StatisticsMeta. + ConnectivityMatrixEntry. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7ae31f705e9a8fa0e6bb6614787e440ad5d86410 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixEntryMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrix-entry + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrix-entry + """ + + def __init__(self): + super().__init__(ConnectivityMatrixEntry) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixEntryMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrixEntry': + pass + + def __enter__(self) -> 'ConnectivityMatrixEntry': + pass + + +class ConnectivityMatrixEntry( + YANGContainer, + metaclass=ConnectivityMatrixEntryMeta): + """ + YANG container handler. + + YANG name: connectivity-matrix-entry + """ + + _yang_name: Final[str] = 'connectivity-matrix-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'creates': ( + creates := YANGLeafMember( + 'creates', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'deletes': ( + deletes := YANGLeafMember( + 'deletes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrixEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c56ab2444397767e1a021bf9158d0f3ccad1a088 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: node + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: node + """ + + def __init__(self): + super().__init__(Node) + + def __get__(self, instance, owner=None) -> ( + 'NodeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Node': + pass + + def __enter__(self) -> 'Node': + pass + + +class Node( + YANGContainer, + metaclass=NodeMeta): + """ + YANG container handler. + + YANG name: node + """ + + _yang_name: Final[str] = 'node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Node': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34072811b1c72f6894141790ae68180723d5b09 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNodeAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-node-attributes + """ + from .connectivity_matrices import ConnectivityMatrices + from .underlay_topology import UnderlayTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-node-attributes + """ + + def __init__(self): + super().__init__(TeNodeAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeNodeAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNodeAttributes': + pass + + def __enter__(self) -> 'TeNodeAttributes': + pass + + +class TeNodeAttributes( + YANGContainer, + metaclass=TeNodeAttributesMeta): + """ + YANG container handler. + + YANG name: te-node-attributes + """ + + _yang_name: Final[str] = 'te-node-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connectivity-matrices': ( + connectivity_matrices := ( # YANGContainerMember( + TeNodeAttributesMeta. + ConnectivityMatrices. + yang_container_descriptor())), + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + TeNodeAttributesMeta. + UnderlayTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNodeAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b6cae8709d65455d297c24861f6fd52badff4745 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatricesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrices + """ + from .label_restrictions import LabelRestrictions + from .optimizations import Optimizations + from .underlay import Underlay + from .path_properties import PathProperties + from .path_constraints import PathConstraints + from .connectivity_matrix import ConnectivityMatrix + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrices + """ + + def __init__(self): + super().__init__(ConnectivityMatrices) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatricesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrices': + pass + + def __enter__(self) -> 'ConnectivityMatrices': + pass + + +class ConnectivityMatrices( + YANGContainer, + metaclass=ConnectivityMatricesMeta): + """ + YANG container handler. + + YANG name: connectivity-matrices + """ + + _yang_name: Final[str] = 'connectivity-matrices' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ConnectivityMatricesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Optimizations. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Underlay. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-matrix': ( + connectivity_matrix := ( # YANGListMember( + ConnectivityMatricesMeta. + ConnectivityMatrix. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..caf8d26a9e2be21ed0d3b862f36049fb6a191df9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,144 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-matrix + """ + from .to import To + from .path_properties import PathProperties + from .underlay import Underlay + from .path_constraints import PathConstraints + from .from import From + from .optimizations import Optimizations + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-matrix + """ + + def __init__(self): + super().__init__(ConnectivityMatrix) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityMatrix']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityMatrix']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityMatrix': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + pass + + +class ConnectivityMatrix( + YANGListItem, + metaclass=ConnectivityMatrixMeta): + """ + YANG list item handler. + + YANG name: connectivity-matrix + """ + + _yang_name: Final[str] = 'connectivity-matrix' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'to': ( + to := ( # YANGContainerMember( + ConnectivityMatrixMeta. + To. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathProperties. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Underlay. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathConstraints. + yang_container_descriptor())), + + 'from': ( + from := ( # YANGContainerMember( + ConnectivityMatrixMeta. + From. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Optimizations. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrix': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14cbae7304f9e1b80e18a1547974269f00b66621 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class FromMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: from + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: from + """ + + def __init__(self): + super().__init__(From) + + def __get__(self, instance, owner=None) -> ( + 'FromMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'From': + pass + + def __enter__(self) -> 'From': + pass + + +class From( + YANGContainer, + metaclass=FromMeta): + """ + YANG container handler. + + YANG name: from + """ + + _yang_name: Final[str] = 'from' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + FromMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'From': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..90d6fbfa8ef329a23ca16908801c5dfc1c509b01 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_step import LabelStep + from .label_start import LabelStart + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bad2331fc0f109b98bda93287a822244302b5d1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8100bae93730074ddc472dfb8328dc9ec9b34a21 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .srlg import Srlg + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f251c42ed301ea688e4e921968867ed262acfa2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6f5aceab23841faec8396e85e86e21692641125f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..df295258db86b4261becc2471833afaabe8421be --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_names import PathSrlgsNames + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28ea603a0e4ee2c731661a01ab1dbbee36529de5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d03118f5c94e3726341c4332447847c61623d616 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ToMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: to + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: to + """ + + def __init__(self): + super().__init__(To) + + def __get__(self, instance, owner=None) -> ( + 'ToMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'To': + pass + + def __enter__(self) -> 'To': + pass + + +class To( + YANGContainer, + metaclass=ToMeta): + """ + YANG container handler. + + YANG name: to + """ + + _yang_name: Final[str] = 'to' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ToMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'To': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6963852ba0c84a4b78122f6ad1185f29748eb5f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac722c47add5d381fef94d2c3a2f5750b49a2688 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .primary_path import PrimaryPath + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..39f656215584aa2bcf14b3ba1a003b8347ff4977 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..17a8ab32f6e4e90649c07d42b9433c6639fb2934 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e01f01986b3d51fd6143967c4f05b169aff11129 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..832dd2f7ef2d442bd2e0efe6ad680c3d4fd15402 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..519535f45f22cf80d11d26ecfff5511b21632ae4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .srlg import Srlg + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cdc24c09f1b3ccadebb91f2dbb9442bbfbd3595d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0fc658253392d53b5678ebb702dd6ecb3cee4165 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5baa996de0fff24876e40ec73f87a7a90da1f2ea --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28191362a8a0f4d9e8af895e993672214dc2b00f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_metric_bounds import PathMetricBounds + from .path_affinity_names import PathAffinityNames + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .te_bandwidth import TeBandwidth + from .path_affinities_values import PathAffinitiesValues + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..149786798cff216d2d5c3159b457969263950a72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f251c42ed301ea688e4e921968867ed262acfa2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e16cb666ce1a7bc800b744b15e11b1d4b7279e6d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c1142926ba50c34d71606b198e801811b621385 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c00e57c237e53df3a2bba30cffe83a15d1149756 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a2840f2560d9dcbb55f2d1dcd7515046766223b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py @@ -0,0 +1,167 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel-termination-point + """ + from .client_layer_adaptation import ClientLayerAdaptation + from .statistics import Statistics + from .local_link_connectivities import LocalLinkConnectivities + from .geolocation import Geolocation + from .supporting_tunnel_termination_point import SupportingTunnelTerminationPoint + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel-termination-point + """ + + def __init__(self): + super().__init__(TunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TunnelTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['TunnelTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'TunnelTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'TunnelTerminationPointMeta.yang_list_descriptor'): + pass + + +class TunnelTerminationPoint( + YANGListItem, + metaclass=TunnelTerminationPointMeta): + """ + YANG list item handler. + + YANG name: tunnel-termination-point + """ + + _yang_name: Final[str] = 'tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-tp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-tp-id': ( + tunnel_tp_id := YANGLeafMember( + 'tunnel-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'client-layer-adaptation': ( + client_layer_adaptation := ( # YANGContainerMember( + TunnelTerminationPointMeta. + ClientLayerAdaptation. + yang_container_descriptor())), + + 'statistics': ( + statistics := ( # YANGContainerMember( + TunnelTerminationPointMeta. + Statistics. + yang_container_descriptor())), + + 'local-link-connectivities': ( + local_link_connectivities := ( # YANGContainerMember( + TunnelTerminationPointMeta. + LocalLinkConnectivities. + yang_container_descriptor())), + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TunnelTerminationPointMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-tunnel-termination-point': ( + supporting_tunnel_termination_point := ( # YANGListMember( + TunnelTerminationPointMeta. + SupportingTunnelTerminationPoint. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38f9ec314a9426a5fe03975be29a2e28b422a31e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ClientLayerAdaptationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: client-layer-adaptation + """ + from .switching_capability import SwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: client-layer-adaptation + """ + + def __init__(self): + super().__init__(ClientLayerAdaptation) + + def __get__(self, instance, owner=None) -> ( + 'ClientLayerAdaptationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ClientLayerAdaptation': + pass + + def __enter__(self) -> 'ClientLayerAdaptation': + pass + + +class ClientLayerAdaptation( + YANGContainer, + metaclass=ClientLayerAdaptationMeta): + """ + YANG container handler. + + YANG name: client-layer-adaptation + """ + + _yang_name: Final[str] = 'client-layer-adaptation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'switching-capability': ( + switching_capability := ( # YANGListMember( + ClientLayerAdaptationMeta. + SwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ClientLayerAdaptation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74c496e9c8505568c18ca8db338e3c313884945d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: switching-capability + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: switching-capability + """ + + def __init__(self): + super().__init__(SwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'SwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['SwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'SwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'SwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class SwitchingCapability( + YANGListItem, + metaclass=SwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: switching-capability + """ + + _yang_name: Final[str] = 'switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + SwitchingCapabilityMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e58eb1516669a36eac9abd5451d7335da8de62a4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d107aca7146b13039b609d38c023443bfe120a37 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivitiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: local-link-connectivities + """ + from .underlay import Underlay + from .path_constraints import PathConstraints + from .path_properties import PathProperties + from .label_restrictions import LabelRestrictions + from .optimizations import Optimizations + from .local_link_connectivity import LocalLinkConnectivity + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: local-link-connectivities + """ + + def __init__(self): + super().__init__(LocalLinkConnectivities) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivitiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LocalLinkConnectivities': + pass + + def __enter__(self) -> 'LocalLinkConnectivities': + pass + + +class LocalLinkConnectivities( + YANGContainer, + metaclass=LocalLinkConnectivitiesMeta): + """ + YANG container handler. + + YANG name: local-link-connectivities + """ + + _yang_name: Final[str] = 'local-link-connectivities' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay': ( + underlay := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + Underlay. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + PathConstraints. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + PathProperties. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + Optimizations. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'local-link-connectivity': ( + local_link_connectivity := ( # YANGListMember( + LocalLinkConnectivitiesMeta. + LocalLinkConnectivity. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivities': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..814ea59a555c0c31d59f79bd58db695d0fb105e8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..89dc7a8809c12f5dc8f942f7719322884fea3b49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py @@ -0,0 +1,137 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: local-link-connectivity + """ + from .underlay import Underlay + from .optimizations import Optimizations + from .label_restrictions import LabelRestrictions + from .path_properties import PathProperties + from .path_constraints import PathConstraints + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: local-link-connectivity + """ + + def __init__(self): + super().__init__(LocalLinkConnectivity) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LocalLinkConnectivity']: + pass + + def __iter__(self, key) -> Iterator['LocalLinkConnectivity']: + return super().__iter__() + + def __getitem__(self, key) -> 'LocalLinkConnectivity': + return super()[key] + + def __enter__(self) -> ( + 'LocalLinkConnectivityMeta.yang_list_descriptor'): + pass + + +class LocalLinkConnectivity( + YANGListItem, + metaclass=LocalLinkConnectivityMeta): + """ + YANG list item handler. + + YANG name: local-link-connectivity + """ + + _yang_name: Final[str] = 'local-link-connectivity' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'link-tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-ref': ( + link_tp_ref := YANGLeafMember( + 'link-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay': ( + underlay := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + Underlay. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + Optimizations. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivity': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1075ea1483389fe2d8a6245c8b19b16007859ffb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_end import LabelEnd + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d71309cbb007ad744071cd2a2bbacb7964114efc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .srlg import Srlg + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97c7b52d53563f340bcf3adef447aa2d718ee50b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ffa7b66e87daa14eb143c6501aa376cc779aed5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_metric_bounds import PathMetricBounds + from .te_bandwidth import TeBandwidth + from .path_affinity_names import PathAffinityNames + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e72a44fd364b7d9238cef98eba888090a23f76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bde8f98e58827b2019a01b80cad4ec0198201e72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_affinity_names import PathAffinityNames + from .path_route_objects import PathRouteObjects + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce99e420e4339dbff19a79559a99828a5632ed52 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..718667143f90b280fcd63585a43ec31bd9555933 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1ab68ff674ea58adde5a644c74609928fe6f874 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_link_hop import NumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1182654a4bf2eb5a4496796aa2c9752309208f46 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2961e2bf8c581c42005442bebf3b91dd7424a524 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..088a2a9a5842516b7391cf36f8c90e94028a03d5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b3f85a0993ca8184c4cec6a891f373b0666767 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef448f1cfb4766cf527a00e8da8e1a261466c995 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .srlg import Srlg + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..943ba0bd2ef587976729a620de43a51d18612462 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .as_number import AsNumber + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad1ed06e7edbba03876800aa1f46233860ec8b0d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c83cf0a2d0df81953e96e2a55fde9fd16c751d0a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_metric_bounds import PathMetricBounds + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..41c96a46e00a42f281a1cdc712517006ccd5fa0b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_route_objects import PathRouteObjects + from .path_affinity_names import PathAffinityNames + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba147c0c9510241b8cc6f8aa2235042dd634f850 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e568286bdabfa9cd970ff66b3e9b6a807b0f31f3 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..756916fe5305db0152f03d2c6c3aabec84ab6e89 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dcd3c6917ac3e0b72b371917edbce5bc14d39c40 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5baa996de0fff24876e40ec73f87a7a90da1f2ea --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ed869cac9cbe0a847a4fd06e39f4e8cb0944cfb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py @@ -0,0 +1,99 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + from .tunnel_termination_point import TunnelTerminationPoint + from .local_link_connectivity import LocalLinkConnectivity + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnel-termination-point': ( + tunnel_termination_point := ( # YANGContainerMember( + StatisticsMeta. + TunnelTerminationPoint. + yang_container_descriptor())), + + 'local-link-connectivity': ( + local_link_connectivity := ( # YANGContainerMember( + StatisticsMeta. + LocalLinkConnectivity. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..968aa5f224d812d13c53912ca6346f0e872afa9d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivityMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: local-link-connectivity + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: local-link-connectivity + """ + + def __init__(self): + super().__init__(LocalLinkConnectivity) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivityMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LocalLinkConnectivity': + pass + + def __enter__(self) -> 'LocalLinkConnectivity': + pass + + +class LocalLinkConnectivity( + YANGContainer, + metaclass=LocalLinkConnectivityMeta): + """ + YANG container handler. + + YANG name: local-link-connectivity + """ + + _yang_name: Final[str] = 'local-link-connectivity' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'creates': ( + creates := YANGLeafMember( + 'creates', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'deletes': ( + deletes := YANGLeafMember( + 'deletes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivity': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0226e0183e765f0c6bfc59a10e95220a32c88eb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-point + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-point + """ + + def __init__(self): + super().__init__(TunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoint': + pass + + def __enter__(self) -> 'TunnelTerminationPoint': + pass + + +class TunnelTerminationPoint( + YANGContainer, + metaclass=TunnelTerminationPointMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-point + """ + + _yang_name: Final[str] = 'tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'downs': ( + downs := YANGLeafMember( + 'downs', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'in-service-sets': ( + in_service_sets := YANGLeafMember( + 'in-service-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'ups': ( + ups := YANGLeafMember( + 'ups', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'in-service-clears': ( + in_service_clears := YANGLeafMember( + 'in-service-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c49df48431602d92607be89318349d2e837536e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingTunnelTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-tunnel-termination-point + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-tunnel-termination-point + """ + + def __init__(self): + super().__init__(SupportingTunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'SupportingTunnelTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingTunnelTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['SupportingTunnelTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingTunnelTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'SupportingTunnelTerminationPointMeta.yang_list_descriptor'): + pass + + +class SupportingTunnelTerminationPoint( + YANGListItem, + metaclass=SupportingTunnelTerminationPointMeta): + """ + YANG list item handler. + + YANG name: supporting-tunnel-termination-point + """ + + _yang_name: Final[str] = 'supporting-tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'node-ref', + 'tunnel-tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-tp-ref': ( + tunnel_tp_ref := YANGLeafMember( + 'tunnel-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingTunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c57b1997c1a86a82962fe2fa49041f529d8c1e0b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: termination-point + """ + from .te import Te + from .supporting_termination_point import SupportingTerminationPoint + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: termination-point + """ + + def __init__(self): + super().__init__(TerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['TerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'TerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'TerminationPointMeta.yang_list_descriptor'): + pass + + +class TerminationPoint( + YANGListItem, + metaclass=TerminationPointMeta): + """ + YANG list item handler. + + YANG name: termination-point + """ + + _yang_name: Final[str] = 'termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-tp-id': ( + te_tp_id := YANGLeafMember( + 'te-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tp-id': ( + tp_id := YANGLeafMember( + 'tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + TerminationPointMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-termination-point': ( + supporting_termination_point := ( # YANGListMember( + TerminationPointMeta. + SupportingTerminationPoint. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..677a83f1ad4e37460d2b705a8aae82f716d19ced --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-termination-point + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-termination-point + """ + + def __init__(self): + super().__init__(SupportingTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'SupportingTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['SupportingTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'SupportingTerminationPointMeta.yang_list_descriptor'): + pass + + +class SupportingTerminationPoint( + YANGListItem, + metaclass=SupportingTerminationPointMeta): + """ + YANG list item handler. + + YANG name: supporting-termination-point + """ + + _yang_name: Final[str] = 'supporting-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'node-ref', + 'tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..01c6bcdf0dcc0a0e9c3adb4b0c4580182a030510 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .geolocation import Geolocation + from .interface_switching_capability import InterfaceSwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'inter-domain-plug-id': ( + inter_domain_plug_id := YANGLeafMember( + 'inter-domain-plug-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e58eb1516669a36eac9abd5451d7335da8de62a4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aed5f69dcca9f3ba106cbda0db555f0efa7fecd1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1edaacf9b3aac3691d69f548e6e01772d428b4c6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingNetworkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-network + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-network + """ + + def __init__(self): + super().__init__(SupportingNetwork) + + def __get__(self, instance, owner=None) -> ( + 'SupportingNetworkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingNetwork']: + pass + + def __iter__(self, key) -> Iterator['SupportingNetwork']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingNetwork': + return super()[key] + + def __enter__(self) -> ( + 'SupportingNetworkMeta.yang_list_descriptor'): + pass + + +class SupportingNetwork( + YANGListItem, + metaclass=SupportingNetworkMeta): + """ + YANG list item handler. + + YANG name: supporting-network + """ + + _yang_name: Final[str] = 'supporting-network' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingNetwork': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..748195d4bd7b81c2ed3d20720cab2c5bff4750aa --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py @@ -0,0 +1,111 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .geolocation import Geolocation + from .nsrlg import Nsrlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'preference': ( + preference := YANGLeafMember( + 'preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'optimization-criterion': ( + optimization_criterion := YANGLeafMember( + 'optimization-criterion', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'nsrlg': ( + nsrlg := ( # YANGListMember( + TeMeta. + Nsrlg. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a631c3553d9ab5ce7b22b799dbf338a0f87fa43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed5c7ab09b9180c21eb845684ade6a69b7ca0705 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NsrlgMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: nsrlg + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: nsrlg + """ + + def __init__(self): + super().__init__(Nsrlg) + + def __get__(self, instance, owner=None) -> ( + 'NsrlgMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Nsrlg']: + pass + + def __iter__(self, key) -> Iterator['Nsrlg']: + return super().__iter__() + + def __getitem__(self, key) -> 'Nsrlg': + return super()[key] + + def __enter__(self) -> ( + 'NsrlgMeta.yang_list_descriptor'): + pass + + +class Nsrlg( + YANGListItem, + metaclass=NsrlgMeta): + """ + YANG list item handler. + + YANG name: nsrlg + """ + + _yang_name: Final[str] = 'nsrlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Nsrlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7960995015a5d11e0610babc72827436a32087c1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyIdentifierMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology-identifier + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology-identifier + """ + + def __init__(self): + super().__init__(TeTopologyIdentifier) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyIdentifierMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopologyIdentifier': + pass + + def __enter__(self) -> 'TeTopologyIdentifier': + pass + + +class TeTopologyIdentifier( + YANGContainer, + metaclass=TeTopologyIdentifierMeta): + """ + YANG container handler. + + YANG name: te-topology-identifier + """ + + _yang_name: Final[str] = 'te-topology-identifier' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'topology-id': ( + topology_id := YANGLeafMember( + 'topology-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'provider-id': ( + provider_id := YANGLeafMember( + 'provider-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'client-id': ( + client_id := YANGLeafMember( + 'client-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopologyIdentifier': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e44025b207547eea5e7bd79b657543db9c3a4deb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .templates import Templates + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'templates': ( + templates := ( # YANGContainerMember( + TeMeta. + Templates. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7445085d6958e61bbe27aa9366276cfb2d0f2fa4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TemplatesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: templates + """ + from .link_template import LinkTemplate + from .node_template import NodeTemplate + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: templates + """ + + def __init__(self): + super().__init__(Templates) + + def __get__(self, instance, owner=None) -> ( + 'TemplatesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Templates': + pass + + def __enter__(self) -> 'Templates': + pass + + +class Templates( + YANGContainer, + metaclass=TemplatesMeta): + """ + YANG container handler. + + YANG name: templates + """ + + _yang_name: Final[str] = 'templates' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'link-template': ( + link_template := ( # YANGListMember( + TemplatesMeta. + LinkTemplate. + yang_list_descriptor())), + + 'node-template': ( + node_template := ( # YANGListMember( + TemplatesMeta. + NodeTemplate. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Templates': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6436895020aa9f268a9cf4b4959e7b3782ab8fdd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LinkTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: link-template + """ + from .te_link_attributes import TeLinkAttributes + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: link-template + """ + + def __init__(self): + super().__init__(LinkTemplate) + + def __get__(self, instance, owner=None) -> ( + 'LinkTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LinkTemplate']: + pass + + def __iter__(self, key) -> Iterator['LinkTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'LinkTemplate': + return super()[key] + + def __enter__(self) -> ( + 'LinkTemplateMeta.yang_list_descriptor'): + pass + + +class LinkTemplate( + YANGListItem, + metaclass=LinkTemplateMeta): + """ + YANG list item handler. + + YANG name: link-template + """ + + _yang_name: Final[str] = 'link-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'reference-change-policy': ( + reference_change_policy := YANGLeafMember( + 'reference-change-policy', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-link-attributes': ( + te_link_attributes := ( # YANGContainerMember( + LinkTemplateMeta. + TeLinkAttributes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LinkTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8165170f1f32e48c8d9e9a8bf33effd915d56ea8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py @@ -0,0 +1,202 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLinkAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-link-attributes + """ + from .external_domain import ExternalDomain + from .max_link_bandwidth import MaxLinkBandwidth + from .te_nsrlgs import TeNsrlgs + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .label_restrictions import LabelRestrictions + from .underlay import Underlay + from .te_srlgs import TeSrlgs + from .interface_switching_capability import InterfaceSwitchingCapability + from .unreserved_bandwidth import UnreservedBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-link-attributes + """ + + def __init__(self): + super().__init__(TeLinkAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeLinkAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLinkAttributes': + pass + + def __enter__(self) -> 'TeLinkAttributes': + pass + + +class TeLinkAttributes( + YANGContainer, + metaclass=TeLinkAttributesMeta): + """ + YANG container handler. + + YANG name: te-link-attributes + """ + + _yang_name: Final[str] = 'te-link-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'access-type': ( + access_type := YANGLeafMember( + 'access-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'external-domain': ( + external_domain := ( # YANGContainerMember( + TeLinkAttributesMeta. + ExternalDomain. + yang_container_descriptor())), + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeNsrlgs. + yang_container_descriptor())), + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + TeLinkAttributesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeLinkAttributesMeta. + Underlay. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeSrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeLinkAttributesMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + TeLinkAttributesMeta. + UnreservedBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLinkAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..30e28c4c7b69dff7823e0a7aa87672840b5f317b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExternalDomainMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: external-domain + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: external-domain + """ + + def __init__(self): + super().__init__(ExternalDomain) + + def __get__(self, instance, owner=None) -> ( + 'ExternalDomainMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExternalDomain': + pass + + def __enter__(self) -> 'ExternalDomain': + pass + + +class ExternalDomain( + YANGContainer, + metaclass=ExternalDomainMeta): + """ + YANG container handler. + + YANG name: external-domain + """ + + _yang_name: Final[str] = 'external-domain' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-link-tp-id': ( + remote_te_link_tp_id := YANGLeafMember( + 'remote-te-link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-node-id': ( + remote_te_node_id := YANGLeafMember( + 'remote-te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExternalDomain': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aed5f69dcca9f3ba106cbda0db555f0efa7fecd1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..59861169cdfff61daccfdded5e79caf46694f7f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e16cb666ce1a7bc800b744b15e11b1d4b7279e6d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..088a2a9a5842516b7391cf36f8c90e94028a03d5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..82e2d504aaeb513b94637bc327bfe2492f2f2447 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .label import Label + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b2973312bf2c09a332f8dc3751bd797b11115c98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: node-template + """ + from .te_node_attributes import TeNodeAttributes + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: node-template + """ + + def __init__(self): + super().__init__(NodeTemplate) + + def __get__(self, instance, owner=None) -> ( + 'NodeTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['NodeTemplate']: + pass + + def __iter__(self, key) -> Iterator['NodeTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'NodeTemplate': + return super()[key] + + def __enter__(self) -> ( + 'NodeTemplateMeta.yang_list_descriptor'): + pass + + +class NodeTemplate( + YANGListItem, + metaclass=NodeTemplateMeta): + """ + YANG list item handler. + + YANG name: node-template + """ + + _yang_name: Final[str] = 'node-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'reference-change-policy': ( + reference_change_policy := YANGLeafMember( + 'reference-change-policy', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-node-attributes': ( + te_node_attributes := ( # YANGContainerMember( + NodeTemplateMeta. + TeNodeAttributes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NodeTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d33037182fea0bb3aaf9c33036500240c54c6058 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNodeAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-node-attributes + """ + from .underlay_topology import UnderlayTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-node-attributes + """ + + def __init__(self): + super().__init__(TeNodeAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeNodeAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNodeAttributes': + pass + + def __enter__(self) -> 'TeNodeAttributes': + pass + + +class TeNodeAttributes( + YANGContainer, + metaclass=TeNodeAttributesMeta): + """ + YANG container handler. + + YANG name: te-node-attributes + """ + + _yang_name: Final[str] = 'te-node-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + TeNodeAttributesMeta. + UnderlayTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNodeAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt new file mode 100644 index 0000000000000000000000000000000000000000..b81498dd8aa94457e2658cc29586de66242ae391 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt @@ -0,0 +1,261 @@ +# IETF draft-ietf-teas-ietf-network-slice-nbi-yang-02 - IETF Network Slice Service YANG Model +# Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ + +module: ietf-network-slice-service + +--rw network-slice-services + +--rw slo-sle-templates + | +--rw slo-sle-template* [id] + | +--rw id string + | +--rw template-description? string + +--rw slice-service* [service-id] + +--rw service-id string + +--rw service-description? string + +--rw service-tags + | +--rw tag-type* [tag-type] + | | +--rw tag-type identityref + | | +--rw value* string + | +--rw tag-opaque* [tag-name] + | +--rw tag-name string + | +--rw value* string + +--rw (slo-sle-policy)? + | +--:(standard) + | | +--rw slo-sle-template? leafref + | +--:(custom) + | +--rw service-slo-sle-policy + | +--rw policy-description? string + | +--rw metric-bounds + | | +--rw metric-bound* [metric-type] + | | +--rw metric-type identityref + | | +--rw metric-unit string + | | +--rw value-description? string + | | +--rw bound? uint64 + | +--rw security* identityref + | +--rw isolation? identityref + | +--rw max-occupancy-level? uint8 + | +--rw mtu? uint16 + | +--rw steering-constraints + | +--rw path-constraints + | +--rw service-function + +--rw status + | +--rw admin-status + | | +--rw status? identityref + | | +--rw last-updated? yang:date-and-time + | +--ro oper-status + | +--ro status? identityref + | +--ro last-updated? yang:date-and-time + +--rw sdps + | +--rw sdp* [sdp-id] + | +--rw sdp-id string + | +--rw sdp-description? string + | +--rw location + | | +--rw altitude? int64 + | | +--rw latitude? decimal64 + | | +--rw longitude? decimal64 + | +--rw node-id? string + | +--rw sdp-ip? inet:ip-address + | +--rw service-match-criteria + | | +--rw match-criterion* [index] + | | +--rw index uint32 + | | +--rw match-type + | | | identityref + | | +--rw value* string + | | +--rw target-connection-group-id leafref + | | +--rw connection-group-sdp-role? + | | | identityref + | | +--rw target-connectivity-construct-id? leafref + | +--rw sdp-peering + | | +--rw protocol* [protocol-type] + | | | +--rw protocol-type identityref + | | | +--rw attribute* [attribute-type] + | | | +--rw attribute-type identityref + | | | +--rw value* string + | | +--rw opaque* [attribute-name] + | | +--rw attribute-name string + | | +--rw value* string + | +--rw attachment-circuits + | | +--rw attachment-circuit* [ac-id] + | | +--rw ac-id string + | | +--rw ac-description? string + | | +--rw ac-node-id? string + | | +--rw ac-tp-id? string + | | +--rw ac-ip-address? inet:ip-address + | | +--rw ac-ip-prefix-length? uint8 + | | +--rw ac-qos-policy-name? string + | | +--rw mtu? uint16 + | | +--rw ac-tags + | | | +--rw ac-tags* [ac-tag-type] + | | | | +--rw ac-tag-type identityref + | | | | +--rw value* string + | | | +--rw ac-tag-opaque* [tag-name] + | | | +--rw tag-name string + | | | +--rw value* string + | | +--rw service-match-criteria + | | | +--rw match-criterion* [index] + | | | +--rw index + | | | | uint32 + | | | +--rw match-type + | | | | identityref + | | | +--rw value* + | | | | string + | | | +--rw target-connection-group-id leafref + | | | +--rw connection-group-sdp-role? + | | | | identityref + | | | +--rw target-connectivity-construct-id? leafref + | | +--rw sdp-peering + | | | +--rw protocol* [protocol-type] + | | | | +--rw protocol-type identityref + | | | | +--rw attribute* [attribute-type] + | | | | +--rw attribute-type identityref + | | | | +--rw value* string + | | | +--rw opaque* [attribute-name] + | | | +--rw attribute-name string + | | | +--rw value* string + | | +--rw incoming-rate-limits + | | | +--rw cir? uint64 + | | | +--rw cbs? uint64 + | | | +--rw eir? uint64 + | | | +--rw ebs? uint64 + | | | +--rw pir? uint64 + | | | +--rw pbs? uint64 + | | +--rw outgoing-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw incoming-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw outgoing-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw status + | | +--rw admin-status + | | | +--rw status? identityref + | | | +--rw last-updated? yang:date-and-time + | | +--ro oper-status + | | +--ro status? identityref + | | +--ro last-updated? yang:date-and-time + | +--ro sdp-monitoring + | +--ro incoming-utilized-bandwidth? + | | te-types:te-bandwidth + | +--ro incoming-bw-utilization decimal64 + | +--ro outgoing-utilized-bandwidth? + | | te-types:te-bandwidth + | +--ro outgoing-bw-utilization decimal64 + +--rw connection-groups + +--rw connection-group* [connection-group-id] + +--rw connection-group-id string + +--rw connectivity-type? identityref + +--rw (slo-sle-policy)? + | +--:(standard) + | | +--rw slo-sle-template? leafref + | +--:(custom) + | +--rw service-slo-sle-policy + | +--rw policy-description? string + | +--rw metric-bounds + | | +--rw metric-bound* [metric-type] + | | +--rw metric-type identityref + | | +--rw metric-unit string + | | +--rw value-description? string + | | +--rw bound? uint64 + | +--rw security* identityref + | +--rw isolation? identityref + | +--rw max-occupancy-level? uint8 + | +--rw mtu? uint16 + | +--rw steering-constraints + | +--rw path-constraints + | +--rw service-function + +--rw connectivity-construct* [cc-id] + | +--rw cc-id uint32 + | +--rw (connectivity-construct-type)? + | | +--:(p2p) + | | | +--rw p2p-sender-sdp? + | | | | -> ../../../../sdps/sdp/sdp-id + | | | +--rw p2p-receiver-sdp? + | | | -> ../../../../sdps/sdp/sdp-id + | | +--:(p2mp) + | | | +--rw p2mp-sender-sdp? + | | | | -> ../../../../sdps/sdp/sdp-id + | | | +--rw p2mp-receiver-sdp* + | | | -> ../../../../sdps/sdp/sdp-id + | | +--:(a2a) + | | +--rw a2a-sdp* [sdp-id] + | | +--rw sdp-id + | | | -> ../../../../../sdps/sdp/sdp-id + | | +--rw (slo-sle-policy)? + | | +--:(standard) + | | | +--rw slo-sle-template? leafref + | | +--:(custom) + | | +--rw service-slo-sle-policy + | | +--rw policy-description? + | | | string + | | +--rw metric-bounds + | | | +--rw metric-bound* + | | | [metric-type] + | | | +--rw metric-type + | | | | identityref + | | | +--rw metric-unit + | | | | string + | | | +--rw value-description? + | | | | string + | | | +--rw bound? + | | | uint64 + | | +--rw security* + | | | identityref + | | +--rw isolation? + | | | identityref + | | +--rw max-occupancy-level? + | | | uint8 + | | +--rw mtu? + | | | uint16 + | | +--rw steering-constraints + | | +--rw path-constraints + | | +--rw service-function + | +--rw (slo-sle-policy)? + | | +--:(standard) + | | | +--rw slo-sle-template? leafref + | | +--:(custom) + | | +--rw service-slo-sle-policy + | | +--rw policy-description? string + | | +--rw metric-bounds + | | | +--rw metric-bound* [metric-type] + | | | +--rw metric-type + | | | | identityref + | | | +--rw metric-unit string + | | | +--rw value-description? string + | | | +--rw bound? uint64 + | | +--rw security* identityref + | | +--rw isolation? identityref + | | +--rw max-occupancy-level? uint8 + | | +--rw mtu? uint16 + | | +--rw steering-constraints + | | +--rw path-constraints + | | +--rw service-function + | +--ro connectivity-construct-monitoring + | +--ro one-way-min-delay? uint32 + | +--ro one-way-max-delay? uint32 + | +--ro one-way-delay-variation? uint32 + | +--ro one-way-packet-loss? decimal64 + | +--ro two-way-min-delay? uint32 + | +--ro two-way-max-delay? uint32 + | +--ro two-way-delay-variation? uint32 + | +--ro two-way-packet-loss? decimal64 + +--ro connection-group-monitoring + +--ro one-way-min-delay? uint32 + +--ro one-way-max-delay? uint32 + +--ro one-way-delay-variation? uint32 + +--ro one-way-packet-loss? decimal64 + +--ro two-way-min-delay? uint32 + +--ro two-way-max-delay? uint32 + +--ro two-way-delay-variation? uint32 + +--ro two-way-packet-loss? decimal64 \ No newline at end of file diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py new file mode 100644 index 0000000000000000000000000000000000000000..c38d75d063374b896ce6767c035175df8774c8ff --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py @@ -0,0 +1,158 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import random +import uuid +import sys +import time +import requests + +from bindings.network_slice_services import NetworkSliceServices + + +# R1 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R1_UUID = "ed2388eb-5fb9-5888-a4f4-160267d3e19b" +R1_PORT_13_0_UUID_OPTICAL = "20440915-1a6c-5e7b-a80f-b0e0e51f066d" +R1_PORT_13_1_UUID_COPPER = "ff900d5d-2ac0-576c-9628-a2d016681f9d" + +# R2 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R2_UUID = "49ce0312-1274-523b-97b8-24d0eca2d72d" +R2_PORT_13_0_UUID_OPTICAL = "214618cb-b63b-5e66-84c2-45c1c016e5f0" +R2_PORT_13_1_UUID_COPPER = "4e0f7fb4-5d22-56ad-a00e-20bffb4860f9" + +# R3 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R3_UUID = "3bc8e994-a3b9-5f60-9c77-6608b1d08313" +R3_PORT_13_0_UUID_OPTICAL = "da5196f5-d651-5def-ada6-50ed6430279d" +R3_PORT_13_1_UUID_COPPER = "43d221fa-5701-5740-a129-502131f5bda2" + +# R4 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R4_UUID = "b43e6361-2573-509d-9a88-1793e751b10d" +R4_PORT_13_0_UUID_OPTICAL = "241b74a7-8677-595c-ad65-cc9093c1e341" +R4_PORT_13_1_UUID_COPPER = "c57abf46-caaf-5954-90cc-1fec0a69330e" + +node_dict = {R1_PORT_13_1_UUID_COPPER: R1_UUID, + R2_PORT_13_1_UUID_COPPER: R2_UUID, + R3_PORT_13_1_UUID_COPPER: R3_UUID, + R4_PORT_13_1_UUID_COPPER: R4_UUID} +list_endpoints = [R1_PORT_13_1_UUID_COPPER, + R2_PORT_13_1_UUID_COPPER, + R3_PORT_13_1_UUID_COPPER, + R4_PORT_13_1_UUID_COPPER] + +list_availability= [99, 99.9, 99.99, 99.999, 99.9999] +list_bw = [10, 40, 50, 100, 150, 200, 400] +list_owner = ["Telefonica", "CTTC", "Telenor", "ADVA", "Ubitech", "ATOS"] + +URL_POST = "/restconf/data/ietf-network-slice-service:ietf-nss/network-slice-services" +URL_DELETE = "/restconf/data/ietf-network-slice-service:ietf-nss/network-slice-services/slice-service=" + +def generate_request(seed: str) -> (dict, str): + + ns = NetworkSliceServices() + + # Slice 1 + suuid = str(uuid.uuid5(uuid.NAMESPACE_DNS, str(seed))) + slice1 = ns.slice_service[suuid] + slice1.service_description = "Test slice for OFC 2023 demo" + slice1.status().admin_status().status = "Planned" # TODO not yet mapped + + ''' + SDPS: + R1 optical to R3 optical + ''' + sdps1 = slice1.sdps().sdp + while True: + ep1_uuid = random.choice(list_endpoints) + ep2_uuid = random.choice(list_endpoints) + if ep1_uuid != ep2_uuid: + break + + sdps1[ep1_uuid].node_id = node_dict.get(ep1_uuid) + sdps1[ep2_uuid].node_id = node_dict.get(ep2_uuid) + + ''' + Connectivity group + Connection construct and 2 sla constrains: + - Bandwidth + - Availability + ''' + cg_uuid = str(uuid.uuid4()) + cg = slice1.connection_groups().connection_group + cg1 = cg[cg_uuid] + + cc1 = cg1.connectivity_construct[0] + cc1.cc_id = 5 + p2p = cc1.connectivity_construct_type.p2p() + p2p.p2p_sender_sdp = ep1_uuid + p2p.p2p_receiver_sdp = ep2_uuid + + slo_custom = cc1.slo_sle_policy.custom() + metric_bounds = slo_custom.service_slo_sle_policy().metric_bounds().metric_bound + + # SLO Bandwidth + slo_bandwidth = metric_bounds["service-slo-two-way-bandwidth"] + slo_bandwidth.value_description = "Guaranteed bandwidth" + slo_bandwidth.bound = int(random.choice(list_bw)) + slo_bandwidth.metric_unit = "Gbps" + + # SLO Availability + slo_availability = metric_bounds["service-slo-availability"] + slo_availability.value_description = "Guaranteed availability" + slo_availability.metric_unit = "percentage" + slo_availability.bound = random.choice(list_availability) + + json_request = {"data": ns.to_json()} + + #Last, add name and owner manually + list_name_owner = [{"tag-type": "owner", "value": random.choice(list_owner)}] + json_request["data"]["ietf-network-slice-service:network-slice-services"]["slice-service"][0]["service-tags"] = list_name_owner + + return (json_request, suuid) + + +if __name__ == "__main__": + print("Generating requests...") + num = int(sys.argv[2]) + ip = str(sys.argv[1]) + list_requests = [] + + for i in range(num): + request = generate_request(i) + list_requests.append(request) + print(f"HTTP.POST={request[0]}-{request[1]}") + time.sleep(2) + requests.post(f"http://{ip}{URL_POST}", auth=("admin", "admin"), json=request[0]) + + print("Slices sent, please press Enter key to delete them...") + input() + + for request,suuid in list_requests: + requests.delete(f"http://{ip}{URL_DELETE}{suuid}", auth=("admin", "admin")) + print(f"HTTP.DELETE={suuid}") + time.sleep(2) + print("All slices deleted!") + + + + + diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Authentication.py b/src/compute/service/rest_server/nbi_plugins/tools/Authentication.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Authentication.py rename to src/compute/service/rest_server/nbi_plugins/tools/Authentication.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/HttpStatusCodes.py b/src/compute/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/HttpStatusCodes.py rename to src/compute/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Validator.py b/src/compute/service/rest_server/nbi_plugins/tools/Validator.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Validator.py rename to src/compute/service/rest_server/nbi_plugins/tools/Validator.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/__init__.py b/src/compute/service/rest_server/nbi_plugins/tools/__init__.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/__init__.py rename to src/compute/service/rest_server/nbi_plugins/tools/__init__.py diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index 8d195cb1d548368c4b1d55f70a3d728ee6fd052e..299827dbdde6f9961d55be5f69f4e359f4e876a7 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -64,13 +64,14 @@ def link_set(db_engine : Engine, request : Link) -> Tuple[Dict, bool]: topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() link_endpoints_data : List[Dict] = list() - for endpoint_id in request.link_endpoint_ids: + for i,endpoint_id in enumerate(request.link_endpoint_ids): endpoint_topology_uuid, _, endpoint_uuid = endpoint_get_uuid( endpoint_id, allow_random=False) link_endpoints_data.append({ 'link_uuid' : link_uuid, 'endpoint_uuid': endpoint_uuid, + 'position' : i, }) if endpoint_topology_uuid not in topology_uuids: diff --git a/src/context/service/database/Service.py b/src/context/service/database/Service.py index a81a80c3c2398fed16842bcc3d8aa16342edb72b..fe12eaf8a011e2ae4861c64cdfac8c4b9c388731 100644 --- a/src/context/service/database/Service.py +++ b/src/context/service/database/Service.py @@ -91,6 +91,7 @@ def service_set(db_engine : Engine, request : Service) -> Tuple[Dict, bool]: service_endpoints_data.append({ 'service_uuid' : service_uuid, 'endpoint_uuid': endpoint_uuid, + 'position' : i, }) constraints = compose_constraints_data(request.service_constraints, now, service_uuid=service_uuid) diff --git a/src/context/service/database/Slice.py b/src/context/service/database/Slice.py index 1d6781d53f7c85d8cb878b1b38b0de65b4ef5726..724046bfae16ea8e75ba84b83ff52c1050242003 100644 --- a/src/context/service/database/Slice.py +++ b/src/context/service/database/Slice.py @@ -91,6 +91,7 @@ def slice_set(db_engine : Engine, request : Slice) -> Tuple[Dict, bool]: slice_endpoints_data.append({ 'slice_uuid' : slice_uuid, 'endpoint_uuid': endpoint_uuid, + 'position' : i, }) slice_services_data : List[Dict] = list() diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index ee591f5c8404cd7f0f6c97651b5f731a51c43303..e9fd9bc8742222e0934a76b6e0ffa4acb1b71f40 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from sqlalchemy import Column, DateTime, ForeignKey, String +import operator +from sqlalchemy import CheckConstraint, Column, DateTime, ForeignKey, Integer, String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict @@ -38,7 +39,7 @@ class LinkModel(_Base): 'name' : self.link_name, 'link_endpoint_ids': [ link_endpoint.endpoint.dump_id() - for link_endpoint in self.link_endpoints + for link_endpoint in sorted(self.link_endpoints, key=operator.attrgetter('position')) ], } @@ -47,6 +48,11 @@ class LinkEndPointModel(_Base): link_uuid = Column(ForeignKey('link.link_uuid', ondelete='CASCADE' ), primary_key=True) endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + position = Column(Integer, nullable=False) link = relationship('LinkModel', back_populates='link_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='link_endpoints' + + __table_args__ = ( + CheckConstraint(position >= 0, name='check_position_value'), + ) diff --git a/src/context/service/database/models/PolicyRuleModel.py b/src/context/service/database/models/PolicyRuleModel.py index 2f0c8a326a57a05ab1fd623a968dea0bc39d9e76..663a9a39a30903b3dd41ccfee56da19528325af0 100644 --- a/src/context/service/database/models/PolicyRuleModel.py +++ b/src/context/service/database/models/PolicyRuleModel.py @@ -64,7 +64,7 @@ class PolicyRuleModel(_Base): 'deviceList': [{'device_uuid': {'uuid': pr_d.device_uuid}} for pr_d in self.policyrule_devices], } if self.policyrule_kind == PolicyRuleKindEnum.SERVICE: - result['serviceId'] = self.policyrule_service.dump_id(), + result['serviceId'] = self.policyrule_service.dump_id() return {self.policyrule_kind.value: result} class PolicyRuleDeviceModel(_Base): diff --git a/src/context/service/database/models/ServiceModel.py b/src/context/service/database/models/ServiceModel.py index 09ff381b5eb374ea752590bba5403fe816319036..f1781c4f86fa25e8d9f3e42da46451e112ef779e 100644 --- a/src/context/service/database/models/ServiceModel.py +++ b/src/context/service/database/models/ServiceModel.py @@ -13,7 +13,7 @@ # limitations under the License. import operator -from sqlalchemy import Column, DateTime, Enum, ForeignKey, String +from sqlalchemy import CheckConstraint, Column, DateTime, Enum, ForeignKey, Integer, String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict @@ -51,7 +51,7 @@ class ServiceModel(_Base): 'service_status' : {'service_status': self.service_status.value}, 'service_endpoint_ids': [ service_endpoint.endpoint.dump_id() - for service_endpoint in self.service_endpoints + for service_endpoint in sorted(self.service_endpoints, key=operator.attrgetter('position')) ], 'service_constraints' : [ constraint.dump() @@ -68,6 +68,11 @@ class ServiceEndPointModel(_Base): service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE' ), primary_key=True) endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + position = Column(Integer, nullable=False) service = relationship('ServiceModel', back_populates='service_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='service_endpoints' + + __table_args__ = ( + CheckConstraint(position >= 0, name='check_position_value'), + ) diff --git a/src/context/service/database/models/SliceModel.py b/src/context/service/database/models/SliceModel.py index 2d6c884169154fee8d44c26464416c6708c650b1..7f1550eb2ebb80962bac94374112d43785184374 100644 --- a/src/context/service/database/models/SliceModel.py +++ b/src/context/service/database/models/SliceModel.py @@ -13,7 +13,7 @@ # limitations under the License. import operator -from sqlalchemy import Column, DateTime, Enum, ForeignKey, String +from sqlalchemy import CheckConstraint, Column, DateTime, Enum, ForeignKey, Integer, String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict @@ -53,7 +53,7 @@ class SliceModel(_Base): 'slice_status' : {'slice_status': self.slice_status.value}, 'slice_endpoint_ids': [ slice_endpoint.endpoint.dump_id() - for slice_endpoint in self.slice_endpoints + for slice_endpoint in sorted(self.slice_endpoints, key=operator.attrgetter('position')) ], 'slice_constraints' : [ constraint.dump() @@ -82,10 +82,15 @@ class SliceEndPointModel(_Base): slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE' ), primary_key=True) endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + position = Column(Integer, nullable=False) slice = relationship('SliceModel', back_populates='slice_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='slice_endpoints' + __table_args__ = ( + CheckConstraint(position >= 0, name='check_position_value'), + ) + class SliceServiceModel(_Base): __tablename__ = 'slice_service' diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 6997e7dfbff6bc1d4b6452a28f11cdac9aae412f..a612803e235de2c6d2d8c91052416a675a3a3085 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -24,6 +24,7 @@ class ORM_DeviceDriverEnum(enum.Enum): IETF_NETWORK_TOPOLOGY = DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY ONF_TR_352 = DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352 XR = DeviceDriverEnum.DEVICEDRIVER_XR + IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/device/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index be40e64ecd25a5c46c23d5ec0a73a2484b65691d..2b08b6c7e03cfd50557f25f99ffea3032dbb811e 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import Dict import grpc, logging from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import NotFoundException, OperationFailedException from common.proto.context_pb2 import ( - Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceOperationalStatusEnum, Empty) + Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceOperationalStatusEnum, Empty, Link) from common.proto.device_pb2 import MonitoringSettings from common.proto.device_pb2_grpc import DeviceServiceServicer from common.tools.context_queries.Device import get_device @@ -28,8 +29,8 @@ from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ERROR_MISSING_DRIVER, ERROR_MISSING_KPI from .Tools import ( check_connect_rules, check_no_endpoints, compute_rules_to_add_delete, configure_rules, deconfigure_rules, - populate_config_rules, populate_endpoint_monitoring_resources, populate_endpoints, populate_initial_config_rules, - subscribe_kpi, unsubscribe_kpi, update_endpoints) + get_device_controller_uuid, populate_config_rules, populate_endpoint_monitoring_resources, populate_endpoints, + populate_initial_config_rules, subscribe_kpi, unsubscribe_kpi, update_endpoints) LOGGER = logging.getLogger(__name__) @@ -73,9 +74,16 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): errors = [] + # Sub-devices and sub-links are exposed by intermediate controllers or represent mgmt links. + # They are used to assist in path computation algorithms, and/or to identify dependencies + # (which controller is in charge of which sub-device). + new_sub_devices : Dict[str, Device] = dict() + new_sub_links : Dict[str, Link] = dict() + if len(device.device_endpoints) == 0: # created from request, populate endpoints using driver - errors.extend(populate_endpoints(device, driver, self.monitoring_loops)) + errors.extend(populate_endpoints( + device, driver, self.monitoring_loops, new_sub_devices, new_sub_links)) if len(device.device_config.config_rules) == len(connection_config_rules): # created from request, populate config rules using driver @@ -87,12 +95,20 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): for error in errors: LOGGER.error(error) raise OperationFailedException('AddDevice', extra_details=errors) + device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED device_id = context_client.SetDevice(device) + for sub_device in new_sub_devices.values(): + context_client.SetDevice(sub_device) + + for sub_links in new_sub_links.values(): + context_client.SetLink(sub_links) + # Update endpoint monitoring resources with UUIDs device_with_uuids = context_client.GetDevice(device_id) populate_endpoint_monitoring_resources(device_with_uuids, self.monitoring_loops) + context_client.close() return device_id finally: self.mutex_queues.signal_done(device_uuid) @@ -109,6 +125,13 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') + device_controller_uuid = get_device_controller_uuid(device) + if device_controller_uuid is not None: + device = get_device(context_client, device_controller_uuid, rw_copy=True) + if device is None: + raise NotFoundException( + 'Device', device_controller_uuid, extra_details='loading in ConfigureDevice') + driver : _Driver = get_driver(self.driver_instance_cache, device) if driver is None: msg = ERROR_MISSING_DRIVER.format(device_uuid=str(device_uuid)) diff --git a/src/device/service/ErrorMessages.py b/src/device/service/ErrorMessages.py index 1fbea721fdc52bdf759581c0525b30b1206ae844..bb7702e4e629bad43df4870d923f0a1829378e2e 100644 --- a/src/device/service/ErrorMessages.py +++ b/src/device/service/ErrorMessages.py @@ -14,9 +14,9 @@ _DEVICE_ID = 'DeviceId({device_uuid:s})' _ENDPOINT_ID = 'EndpointId({endpoint_uuid:s})' -_ENDPOINT_DATA = 'EndpointId({endpoint_data:s})' _KPI = 'Kpi({kpi_uuid:s})' _DEVICE_ENDPOINT_ID = _DEVICE_ID + '/' + _ENDPOINT_ID +_RESOURCE = 'Resource({resource_data:s})' _RESOURCE_KEY = 'Resource(key={resource_key:s})' _RESOURCE_KEY_VALUE = 'Resource(key={resource_key:s}, value={resource_value:s})' _SUBSCRIPTION = 'Subscription(key={subscr_key:s}, duration={subscr_duration:s}, interval={subscr_interval:s})' @@ -26,7 +26,8 @@ _ERROR = 'Error({error:s})' ERROR_MISSING_DRIVER = _DEVICE_ID + ' has not been added to this Device instance' ERROR_MISSING_KPI = _KPI + ' not found' -ERROR_BAD_ENDPOINT = _DEVICE_ID + ': GetConfig retrieved malformed ' + _ENDPOINT_DATA +ERROR_BAD_RESOURCE = _DEVICE_ID + ': GetConfig retrieved malformed ' + _RESOURCE +ERROR_UNSUP_RESOURCE = _DEVICE_ID + ': GetConfig retrieved unsupported ' + _RESOURCE ERROR_GET = _DEVICE_ID + ': Unable to Get ' + _RESOURCE_KEY + '; ' + _ERROR ERROR_GET_INIT = _DEVICE_ID + ': Unable to Get Initial ' + _RESOURCE_KEY + '; ' + _ERROR diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 571e8acdab7fc243c22923a69202c89db88c8ce3..cd3af07e3324e50ff43eb5e653c4c46771a5507e 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -13,19 +13,20 @@ # limitations under the License. import json, logging -from typing import Any, Dict, List, Tuple, Union +from typing import Any, Dict, List, Optional, Tuple, Union from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.method_wrappers.ServiceExceptions import InvalidArgumentException -from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceConfig +from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceConfig, Link from common.proto.device_pb2 import MonitoringSettings from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient from .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ( - ERROR_BAD_ENDPOINT, ERROR_DELETE, ERROR_GET, ERROR_GET_INIT, ERROR_MISSING_KPI, ERROR_SAMPLETYPE, ERROR_SET, - ERROR_SUBSCRIBE, ERROR_UNSUBSCRIBE + ERROR_BAD_RESOURCE, ERROR_DELETE, ERROR_GET, ERROR_GET_INIT, ERROR_MISSING_KPI, ERROR_SAMPLETYPE, ERROR_SET, + ERROR_SUBSCRIBE, ERROR_UNSUBSCRIBE, ERROR_UNSUP_RESOURCE ) LOGGER = logging.getLogger(__name__) @@ -77,19 +78,51 @@ def check_no_endpoints(device_endpoints) -> None: extra_details='RPC method AddDevice does not accept Endpoints. Endpoints are discovered through '\ 'interrogation of the physical device.') -def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : MonitoringLoops) -> List[str]: +def get_device_controller_uuid(device : Device) -> Optional[str]: + for config_rule in device.device_config.config_rules: + if config_rule.WhichOneof('config_rule') != 'custom': continue + if config_rule.custom.resource_key != '_controller': continue + device_controller_id = json.loads(config_rule.custom.resource_value) + return device_controller_id['uuid'] + return None + +def populate_endpoints( + device : Device, driver : _Driver, monitoring_loops : MonitoringLoops, + new_sub_devices : Dict[str, Device], new_sub_links : Dict[str, Link] +) -> List[str]: device_uuid = device.device_id.device_uuid.uuid + device_name = device.name resources_to_get = [RESOURCE_ENDPOINTS] results_getconfig = driver.GetConfig(resources_to_get) + LOGGER.debug('results_getconfig = {:s}'.format(str(results_getconfig))) + + # first quick pass to identify need of mgmt endpoints and links + add_mgmt_port = False + for resource_data in results_getconfig: + if len(resource_data) != 2: continue + resource_key, _ = resource_data + if resource_key.startswith('/devices/device'): + add_mgmt_port = True + break + + if add_mgmt_port: + # add mgmt port to main device + device_mgmt_endpoint = device.device_endpoints.add() + device_mgmt_endpoint.endpoint_id.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + device_mgmt_endpoint.endpoint_id.topology_id.topology_uuid.uuid = DEFAULT_TOPOLOGY_NAME + device_mgmt_endpoint.endpoint_id.device_id.device_uuid.uuid = device_uuid + device_mgmt_endpoint.endpoint_id.endpoint_uuid.uuid = 'mgmt' + device_mgmt_endpoint.name = 'mgmt' + device_mgmt_endpoint.endpoint_type = 'mgmt' errors : List[str] = list() - for endpoint in results_getconfig: - if len(endpoint) != 2: - errors.append(ERROR_BAD_ENDPOINT.format(device_uuid=device_uuid, endpoint_data=str(endpoint))) + for resource_data in results_getconfig: + if len(resource_data) != 2: + errors.append(ERROR_BAD_RESOURCE.format(device_uuid=device_uuid, resource_data=str(resource_data))) continue - resource_key, resource_value = endpoint + resource_key, resource_value = resource_data if isinstance(resource_value, Exception): errors.append(ERROR_GET.format( device_uuid=device_uuid, resource_key=str(resource_key), error=str(resource_value))) @@ -97,19 +130,88 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon if resource_value is None: continue - endpoint_uuid = resource_value.get('uuid') - - device_endpoint = device.device_endpoints.add() - device_endpoint.endpoint_id.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - device_endpoint.endpoint_id.topology_id.topology_uuid.uuid = DEFAULT_TOPOLOGY_NAME - device_endpoint.endpoint_id.device_id.device_uuid.uuid = device_uuid - device_endpoint.endpoint_id.endpoint_uuid.uuid = endpoint_uuid - device_endpoint.endpoint_type = resource_value.get('type') + if resource_key.startswith('/devices/device'): + # create sub-device + _sub_device_uuid = resource_value['uuid'] + _sub_device = Device() + _sub_device.device_id.device_uuid.uuid = _sub_device_uuid # pylint: disable=no-member + _sub_device.name = resource_value['name'] + _sub_device.device_type = resource_value['type'] + _sub_device.device_operational_status = resource_value['status'] + + # Sub-devices should not have a driver assigned. Instead, they should have + # a config rule specifying their controller. + #_sub_device.device_drivers.extend(resource_value['drivers']) # pylint: disable=no-member + controller_config_rule = _sub_device.device_config.config_rules.add() + controller_config_rule.action = ConfigActionEnum.CONFIGACTION_SET + controller_config_rule.custom.resource_key = '_controller' + controller = {'uuid': device_uuid, 'name': device_name} + controller_config_rule.custom.resource_value = json.dumps(controller, indent=0, sort_keys=True) + + new_sub_devices[_sub_device_uuid] = _sub_device + + # add mgmt port to sub-device + _sub_device_mgmt_endpoint = _sub_device.device_endpoints.add() # pylint: disable=no-member + _sub_device_mgmt_endpoint.endpoint_id.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + _sub_device_mgmt_endpoint.endpoint_id.topology_id.topology_uuid.uuid = DEFAULT_TOPOLOGY_NAME + _sub_device_mgmt_endpoint.endpoint_id.device_id.device_uuid.uuid = _sub_device_uuid + _sub_device_mgmt_endpoint.endpoint_id.endpoint_uuid.uuid = 'mgmt' + _sub_device_mgmt_endpoint.name = 'mgmt' + _sub_device_mgmt_endpoint.endpoint_type = 'mgmt' + + # add mgmt link + _mgmt_link_uuid = '{:s}/{:s}=={:s}/{:s}'.format(device_name, 'mgmt', _sub_device.name, 'mgmt') + _mgmt_link = Link() + _mgmt_link.link_id.link_uuid.uuid = _mgmt_link_uuid # pylint: disable=no-member + _mgmt_link.name = _mgmt_link_uuid + _mgmt_link.link_endpoint_ids.append(device_mgmt_endpoint.endpoint_id) # pylint: disable=no-member + _mgmt_link.link_endpoint_ids.append(_sub_device_mgmt_endpoint.endpoint_id) # pylint: disable=no-member + new_sub_links[_mgmt_link_uuid] = _mgmt_link + + elif resource_key.startswith('/endpoints/endpoint'): + endpoint_uuid = resource_value['uuid'] + _device_uuid = resource_value.get('device_uuid') + endpoint_name = resource_value.get('name') + + if _device_uuid is None: + # add endpoint to current device + device_endpoint = device.device_endpoints.add() + device_endpoint.endpoint_id.device_id.device_uuid.uuid = device_uuid + else: + # add endpoint to specified device + device_endpoint = new_sub_devices[_device_uuid].device_endpoints.add() + device_endpoint.endpoint_id.device_id.device_uuid.uuid = _device_uuid + + device_endpoint.endpoint_id.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + device_endpoint.endpoint_id.topology_id.topology_uuid.uuid = DEFAULT_TOPOLOGY_NAME + + device_endpoint.endpoint_id.endpoint_uuid.uuid = endpoint_uuid + if endpoint_name is not None: device_endpoint.name = endpoint_name + device_endpoint.endpoint_type = resource_value.get('type', '-') + + sample_types : Dict[int, str] = resource_value.get('sample_types', {}) + for kpi_sample_type, monitor_resource_key in sample_types.items(): + device_endpoint.kpi_sample_types.append(kpi_sample_type) + monitoring_loops.add_resource_key(device_uuid, endpoint_uuid, kpi_sample_type, monitor_resource_key) + + elif resource_key.startswith('/links/link'): + # create sub-link + _sub_link_uuid = resource_value['uuid'] + _sub_link = Link() + _sub_link.link_id.link_uuid.uuid = _sub_link_uuid # pylint: disable=no-member + _sub_link.name = resource_value['name'] + new_sub_links[_sub_link_uuid] = _sub_link + + for device_uuid,endpoint_uuid in resource_value['endpoints']: + _sub_link_endpoint_id = _sub_link.link_endpoint_ids.add() # pylint: disable=no-member + _sub_link_endpoint_id.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + _sub_link_endpoint_id.topology_id.topology_uuid.uuid = DEFAULT_TOPOLOGY_NAME + _sub_link_endpoint_id.device_id.device_uuid.uuid = device_uuid + _sub_link_endpoint_id.endpoint_uuid.uuid = endpoint_uuid - sample_types : Dict[int, str] = resource_value.get('sample_types', {}) - for kpi_sample_type, monitor_resource_key in sample_types.items(): - device_endpoint.kpi_sample_types.append(kpi_sample_type) - monitoring_loops.add_resource_key(device_uuid, endpoint_uuid, kpi_sample_type, monitor_resource_key) + else: + errors.append(ERROR_UNSUP_RESOURCE.format(device_uuid=device_uuid, resource_data=str(resource_data))) + continue return errors diff --git a/src/device/service/driver_api/ImportTopologyEnum.py b/src/device/service/driver_api/ImportTopologyEnum.py new file mode 100644 index 0000000000000000000000000000000000000000..06f0ff9c2db1f1baccc4b46c5babc4458ca6ffb6 --- /dev/null +++ b/src/device/service/driver_api/ImportTopologyEnum.py @@ -0,0 +1,37 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from enum import Enum +from typing import Dict + +class ImportTopologyEnum(Enum): + # While importing underlying resources, the driver just imports endpoints and exposes them directly. + DISABLED = 'disabled' + + # While importing underlying resources, the driver just imports imports sub-devices but not links + # connecting them. The endpoints are exposed in virtual nodes representing the sub-devices. + # (a remotely-controlled transport domain might exist between nodes) + DEVICES = 'devices' + + # While importing underlying resources, the driver just imports imports sub-devices and links + # connecting them. The endpoints are exposed in virtual nodes representing the sub-devices. + # (enables to define constrained connectivity between the sub-devices) + TOPOLOGY = 'topology' + +def get_import_topology(settings : Dict, default : ImportTopologyEnum = ImportTopologyEnum.DISABLED): + str_import_topology = settings.get('import_topology') + if str_import_topology is None: return default + import_topology = ImportTopologyEnum._value2member_map_.get(str_import_topology) # pylint: disable=no-member + if import_topology is None: raise Exception('Unexpected setting value') + return import_topology diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index cc9f7a2c63f2f841b864cbe4fa596464a6783cec..947bc8570a941f8f666c87647d89c315b1bd202a 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -22,6 +22,7 @@ RESOURCE_ENDPOINTS = '__endpoints__' RESOURCE_INTERFACES = '__interfaces__' RESOURCE_NETWORK_INSTANCES = '__network_instances__' RESOURCE_ROUTING_POLICIES = '__routing_policies__' +RESOURCE_SERVICES = '__services__' RESOURCE_ACL = '__acl__' diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 469abcad387dc055ba17770e4f405db1d1ceaa3b..b3b485a471899dd96a4985fedb4bb6ede2432921 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -74,6 +74,15 @@ DRIVERS.append( #} ])) +from .ietf_l2vpn.IetfL2VpnDriver import IetfL2VpnDriver # pylint: disable=wrong-import-position +DRIVERS.append( + (IetfL2VpnDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN, + } + ])) + if LOAD_ALL_DEVICE_DRIVERS: from .openconfig.OpenConfigDriver import OpenConfigDriver # pylint: disable=wrong-import-position DRIVERS.append( diff --git a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..96dfd2c15f6b359e254a6d6a24dfe42a546833ce --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, threading +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES +from device.service.drivers.ietf_l2vpn.TfsDebugApiClient import TfsDebugApiClient +from .Tools import connection_point, wim_mapping +from .WimconnectorIETFL2VPN import WimconnectorIETFL2VPN + +LOGGER = logging.getLogger(__name__) + +def service_exists(wim : WimconnectorIETFL2VPN, service_uuid : str) -> bool: + try: + wim.get_connectivity_service_status(service_uuid) + return True + except: # pylint: disable=bare-except + return False + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] + +SERVICE_TYPE = 'ELINE' + +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'ietf_l2vpn'}) + +class IetfL2VpnDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: # pylint: disable=super-init-not-called + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + username = settings.get('username') + password = settings.get('password') + scheme = settings.get('scheme', 'http') + wim = {'wim_url': '{:s}://{:s}:{:d}'.format(scheme, address, int(port))} + wim_account = {'user': username, 'password': password} + # Mapping updated dynamically with each request + config = {'mapping_not_needed': False, 'service_endpoint_mapping': []} + self.dac = TfsDebugApiClient(address, int(port), scheme=scheme, username=username, password=password) + self.wim = WimconnectorIETFL2VPN(wim, wim_account, config=config) + self.conn_info = {} # internal database emulating OSM storage provided to WIM Connectors + + def Connect(self) -> bool: + with self.__lock: + try: + self.wim.check_credentials() + except Exception: # pylint: disable=broad-except + LOGGER.exception('Exception checking credentials') + return False + else: + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + results = [] + with self.__lock: + self.wim.check_credentials() + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + for i, resource_key in enumerate(resource_keys): + str_resource_name = 'resource_key[#{:d}]'.format(i) + try: + chk_string(str_resource_name, resource_key, allow_empty=False) + if resource_key == RESOURCE_ENDPOINTS: + # return endpoints through debug-api and list-devices method + results.extend(self.dac.get_devices_endpoints()) + elif resource_key == RESOURCE_SERVICES: + # return all services through + reply = self.wim.get_all_active_connectivity_services() + results.extend(reply.json()) + else: + # assume single-service retrieval + reply = self.wim.get_connectivity_service(resource_key) + results.append(reply.json()) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + results.append((resource_key, e)) + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: return results + with self.__lock: + self.wim.check_credentials() + for resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + resource_key,resource_value = resource + try: + resource_value = json.loads(resource_value) + service_uuid = resource_value['uuid'] + + if service_exists(self.wim, service_uuid): + exc = NotImplementedError('IETF L2VPN Service Update is still not supported') + results.append((resource[0], exc)) + continue + + src_device_name = resource_value['src_device_name'] + src_endpoint_name = resource_value['src_endpoint_name'] + dst_device_name = resource_value['dst_device_name'] + dst_endpoint_name = resource_value['dst_endpoint_name'] + encap_type = resource_value['encapsulation_type'] + vlan_id = resource_value['vlan_id'] + + src_endpoint_id = json_endpoint_id(json_device_id(src_device_name), src_endpoint_name) + src_service_endpoint_id, src_mapping = wim_mapping('1', src_endpoint_id) + self.wim.mappings[src_service_endpoint_id] = src_mapping + + dst_endpoint_id = json_endpoint_id(json_device_id(dst_device_name), dst_endpoint_name) + dst_service_endpoint_id, dst_mapping = wim_mapping('2', dst_endpoint_id) + self.wim.mappings[dst_service_endpoint_id] = dst_mapping + + connection_points = [ + connection_point(src_service_endpoint_id, encap_type, vlan_id), + connection_point(dst_service_endpoint_id, encap_type, vlan_id), + ] + + self.wim.create_connectivity_service(service_uuid, SERVICE_TYPE, connection_points) + results.append((resource_key, True)) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + results.append((resource_key, e)) + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: return results + with self.__lock: + self.wim.check_credentials() + for resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + resource_key,resource_value = resource + try: + resource_value = json.loads(resource_value) + service_uuid = resource_value['uuid'] + + if service_exists(self.wim, service_uuid): + self.wim.delete_connectivity_service(service_uuid) + results.append((resource_key, True)) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + results.append((resource_key, e)) + return results + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: IETF L2VPN 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]]: + # TODO: IETF L2VPN 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]]: + # TODO: IETF L2VPN does not support monitoring by now + return [] diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py new file mode 100644 index 0000000000000000000000000000000000000000..4bf40af030fda990f96efe0ff8ab2ce54f82c312 --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, requests +from requests.auth import HTTPBasicAuth +from typing import Dict, List, Optional + +GET_DEVICES_URL = '{:s}://{:s}:{:d}/restconf/debug-api/devices' +TIMEOUT = 30 + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +MAPPING_STATUS = { + 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, + 'DEVICEOPERATIONALSTATUS_DISABLED' : 1, + 'DEVICEOPERATIONALSTATUS_ENABLED' : 2, +} + +MAPPING_DRIVER = { + 'DEVICEDRIVER_UNDEFINED' : 0, + 'DEVICEDRIVER_OPENCONFIG' : 1, + 'DEVICEDRIVER_TRANSPORT_API' : 2, + 'DEVICEDRIVER_P4' : 3, + 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY': 4, + 'DEVICEDRIVER_ONF_TR_352' : 5, + 'DEVICEDRIVER_XR' : 6, + 'DEVICEDRIVER_IETF_L2VPN' : 7, +} + +MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' + +LOGGER = logging.getLogger(__name__) + +class TfsDebugApiClient: + def __init__( + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None + ) -> None: + self._url = GET_DEVICES_URL.format(scheme, address, port) + self._auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + + def get_devices_endpoints(self) -> List[Dict]: + reply = requests.get(self._url, timeout=TIMEOUT, verify=False, auth=self._auth) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format(str(self._url), str(reply.status_code), str(reply)) + LOGGER.error(msg) + raise Exception(msg) + + result = list() + for json_device in reply.json()['devices']: + device_uuid : str = json_device['device_id']['device_uuid']['uuid'] + device_type : str = json_device['device_type'] + #if not device_type.startswith('emu-'): device_type = 'emu-' + device_type + device_status = json_device['device_operational_status'] + device_url = '/devices/device[{:s}]'.format(device_uuid) + device_data = { + 'uuid': json_device['device_id']['device_uuid']['uuid'], + 'name': json_device['name'], + 'type': device_type, + 'status': MAPPING_STATUS[device_status], + 'drivers': [MAPPING_DRIVER[driver] for driver in json_device['device_drivers']], + } + result.append((device_url, device_data)) + + for json_endpoint in json_device['device_endpoints']: + endpoint_uuid = json_endpoint['endpoint_id']['endpoint_uuid']['uuid'] + endpoint_url = '/endpoints/endpoint[{:s}]'.format(endpoint_uuid) + endpoint_data = { + 'device_uuid': device_uuid, + 'uuid': endpoint_uuid, + 'name': json_endpoint['name'], + 'type': json_endpoint['endpoint_type'], + } + result.append((endpoint_url, endpoint_data)) + + return result diff --git a/src/device/service/drivers/ietf_l2vpn/Tools.py b/src/device/service/drivers/ietf_l2vpn/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..45dfa23c984e175c01efa77371e94454b98ea94e --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/Tools.py @@ -0,0 +1,48 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Optional + +def compose_service_endpoint_id(site_id : str, endpoint_id : Dict): + device_uuid = endpoint_id['device_id']['device_uuid']['uuid'] + endpoint_uuid = endpoint_id['endpoint_uuid']['uuid'] + return ':'.join([site_id, device_uuid, endpoint_uuid]) + +def wim_mapping(site_id, ce_endpoint_id, pe_device_id : Optional[Dict] = None, priority=None, redundant=[]): + ce_device_uuid = ce_endpoint_id['device_id']['device_uuid']['uuid'] + ce_endpoint_uuid = ce_endpoint_id['endpoint_uuid']['uuid'] + service_endpoint_id = compose_service_endpoint_id(site_id, ce_endpoint_id) + if pe_device_id is None: + bearer = '{:s}:{:s}'.format(ce_device_uuid, ce_endpoint_uuid) + else: + pe_device_uuid = pe_device_id['device_uuid']['uuid'] + bearer = '{:s}:{:s}'.format(ce_device_uuid, pe_device_uuid) + mapping = { + 'service_endpoint_id': service_endpoint_id, + 'datacenter_id': site_id, 'device_id': ce_device_uuid, 'device_interface_id': ce_endpoint_uuid, + 'service_mapping_info': { + 'site-id': site_id, + 'bearer': {'bearer-reference': bearer}, + } + } + if priority is not None: mapping['service_mapping_info']['priority'] = priority + if len(redundant) > 0: mapping['service_mapping_info']['redundant'] = redundant + return service_endpoint_id, mapping + +def connection_point(service_endpoint_id : str, encapsulation_type : str, vlan_id : int): + return { + 'service_endpoint_id': service_endpoint_id, + 'service_endpoint_encapsulation_type': encapsulation_type, + 'service_endpoint_encapsulation_info': {'vlan': vlan_id} + } diff --git a/src/device/service/drivers/ietf_l2vpn/WimconnectorIETFL2VPN.py b/src/device/service/drivers/ietf_l2vpn/WimconnectorIETFL2VPN.py new file mode 100644 index 0000000000000000000000000000000000000000..34ff184c022f379e7420de237bd08fc1dc6282a6 --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/WimconnectorIETFL2VPN.py @@ -0,0 +1,565 @@ +# -*- coding: utf-8 -*- +## +# Copyright 2018 Telefonica +# All Rights Reserved. +# +# Contributors: Oscar Gonzalez de Dios, Manuel Lopez Bravo, Guillermo Pajares Martin +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This work has been performed in the context of the Metro-Haul project - +# funded by the European Commission under Grant number 761727 through the +# Horizon 2020 program. +## +"""The SDN/WIM connector is responsible for establishing wide area network +connectivity. + +This SDN/WIM connector implements the standard IETF RFC 8466 "A YANG Data + Model for Layer 2 Virtual Private Network (L2VPN) Service Delivery" + +It receives the endpoints and the necessary details to request +the Layer 2 service. +""" +import requests +import uuid +import logging +import copy +#from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError +from .sdnconn import SdnConnectorBase, SdnConnectorError + +"""Check layer where we move it""" + + +class WimconnectorIETFL2VPN(SdnConnectorBase): + def __init__(self, wim, wim_account, config=None, logger=None): + """IETF L2VPN WIM connector + + Arguments: (To be completed) + wim (dict): WIM record, as stored in the database + wim_account (dict): WIM account record, as stored in the database + """ + self.logger = logging.getLogger("ro.sdn.ietfl2vpn") + super().__init__(wim, wim_account, config, logger) + self.headers = {"Content-Type": "application/json"} + self.mappings = { + m["service_endpoint_id"]: m for m in self.service_endpoint_mapping + } + self.user = wim_account.get("user") + self.passwd = wim_account.get("password") + + if self.user is not None and self.passwd is not None: + self.auth = (self.user, self.passwd) + else: + self.auth = None + + self.logger.info("IETFL2VPN Connector Initialized.") + + def check_credentials(self): + endpoint = "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services".format( + self.wim["wim_url"] + ) + + try: + response = requests.get(endpoint, auth=self.auth) + http_code = response.status_code + except requests.exceptions.RequestException as e: + raise SdnConnectorError(e.response, http_code=503) + + if http_code != 200: + raise SdnConnectorError("Failed while authenticating", http_code=http_code) + + self.logger.info("Credentials checked") + + def get_connectivity_service_status(self, service_uuid, conn_info=None): + """Monitor the status of the connectivity service stablished + + Arguments: + service_uuid: Connectivity service unique identifier + + Returns: + Examples:: + {'sdn_status': 'ACTIVE'} + {'sdn_status': 'INACTIVE'} + {'sdn_status': 'DOWN'} + {'sdn_status': 'ERROR'} + """ + try: + self.logger.info("Sending get connectivity service stuatus") + servicepoint = "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services/vpn-service={}/".format( + self.wim["wim_url"], service_uuid + ) + response = requests.get(servicepoint, auth=self.auth) + self.logger.warning('response.status_code={:s}'.format(str(response.status_code))) + if response.status_code != requests.codes.ok: + raise SdnConnectorError( + "Unable to obtain connectivity servcice status", + http_code=response.status_code, + ) + + service_status = {"sdn_status": "ACTIVE"} + + return service_status + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) + + def search_mapp(self, connection_point): + id = connection_point["service_endpoint_id"] + if id not in self.mappings: + raise SdnConnectorError("Endpoint {} not located".format(str(id))) + else: + return self.mappings[id] + + def create_connectivity_service(self, service_uuid, service_type, connection_points, **kwargs): + """Stablish WAN connectivity between the endpoints + + Arguments: + service_type (str): ``ELINE`` (L2), ``ELAN`` (L2), ``ETREE`` (L2), + ``L3``. + connection_points (list): each point corresponds to + an entry point from the DC to the transport network. One + connection point serves to identify the specific access and + some other service parameters, such as encapsulation type. + Represented by a dict as follows:: + + { + "service_endpoint_id": ..., (str[uuid]) + "service_endpoint_encapsulation_type": ..., + (enum: none, dot1q, ...) + "service_endpoint_encapsulation_info": { + ... (dict) + "vlan": ..., (int, present if encapsulation is dot1q) + "vni": ... (int, present if encapsulation is vxlan), + "peers": [(ipv4_1), (ipv4_2)] + (present if encapsulation is vxlan) + } + } + + The service endpoint ID should be previously informed to the WIM + engine in the RO when the WIM port mapping is registered. + + Keyword Arguments: + bandwidth (int): value in kilobytes + latency (int): value in milliseconds + + Other QoS might be passed as keyword arguments. + + Returns: + tuple: ``conn_info``: + - *conn_info* (dict or None): Information to be stored at the + database (or ``None``). This information will be provided to + the :meth:`~.edit_connectivity_service` and :obj:`~.delete`. + **MUST** be JSON/YAML-serializable (plain data structures). + + Raises: + SdnConnectorException: In case of error. + """ + SETTINGS = { # min_endpoints, max_endpoints, vpn_service_type + 'ELINE': (2, 2, 'vpws'), # Virtual Private Wire Service + 'ELAN' : (2, None, 'vpls'), # Virtual Private LAN Service + } + settings = SETTINGS.get(service_type) + if settings is None: raise NotImplementedError('Unsupported service_type({:s})'.format(str(service_type))) + min_endpoints, max_endpoints, vpn_service_type = settings + + if max_endpoints is not None and len(connection_points) > max_endpoints: + msg = "Connections between more than {:d} endpoints are not supported for service_type {:s}" + raise SdnConnectorError(msg.format(max_endpoints, service_type)) + + if min_endpoints is not None and len(connection_points) < min_endpoints: + msg = "Connections must be of at least {:d} endpoints for service_type {:s}" + raise SdnConnectorError(msg.format(min_endpoints, service_type)) + + """First step, create the vpn service""" + vpn_service = {} + vpn_service["vpn-id"] = service_uuid + vpn_service["vpn-svc-type"] = vpn_service_type + vpn_service["svc-topo"] = "any-to-any" + vpn_service["customer-name"] = "osm" + vpn_service_list = [] + vpn_service_list.append(vpn_service) + vpn_service_l = {"ietf-l2vpn-svc:vpn-service": vpn_service_list} + response_service_creation = None + conn_info = [] + self.logger.info("Sending vpn-service :{}".format(vpn_service_l)) + + try: + endpoint_service_creation = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services".format( + self.wim["wim_url"] + ) + ) + response_service_creation = requests.post( + endpoint_service_creation, + headers=self.headers, + json=vpn_service_l, + auth=self.auth, + ) + except requests.exceptions.ConnectionError: + raise SdnConnectorError( + "Request to create service Timeout", http_code=408 + ) + + if response_service_creation.status_code == 409: + raise SdnConnectorError( + "Service already exists", + http_code=response_service_creation.status_code, + ) + elif response_service_creation.status_code != requests.codes.created: + raise SdnConnectorError( + "Request to create service not accepted", + http_code=response_service_creation.status_code, + ) + + self.logger.info('connection_points = {:s}'.format(str(connection_points))) + + # Check if protected paths are requested + extended_connection_points = [] + for connection_point in connection_points: + extended_connection_points.append(connection_point) + + connection_point_wan_info = self.search_mapp(connection_point) + service_mapping_info = connection_point_wan_info.get('service_mapping_info', {}) + redundant_service_endpoint_ids = service_mapping_info.get('redundant') + + if redundant_service_endpoint_ids is None: continue + if len(redundant_service_endpoint_ids) == 0: continue + + for redundant_service_endpoint_id in redundant_service_endpoint_ids: + redundant_connection_point = copy.deepcopy(connection_point) + redundant_connection_point['service_endpoint_id'] = redundant_service_endpoint_id + extended_connection_points.append(redundant_connection_point) + + self.logger.info('extended_connection_points = {:s}'.format(str(extended_connection_points))) + + """Second step, create the connections and vpn attachments""" + for connection_point in extended_connection_points: + connection_point_wan_info = self.search_mapp(connection_point) + site_network_access = {} + connection = {} + + if connection_point["service_endpoint_encapsulation_type"] != "none": + if ( + connection_point["service_endpoint_encapsulation_type"] + == "dot1q" + ): + """The connection is a VLAN""" + connection["encapsulation-type"] = "dot1q-vlan-tagged" + tagged = {} + tagged_interf = {} + service_endpoint_encapsulation_info = connection_point[ + "service_endpoint_encapsulation_info" + ] + + if service_endpoint_encapsulation_info["vlan"] is None: + raise SdnConnectorError("VLAN must be provided") + + tagged_interf["cvlan-id"] = service_endpoint_encapsulation_info[ + "vlan" + ] + tagged["dot1q-vlan-tagged"] = tagged_interf + connection["tagged-interface"] = tagged + else: + raise NotImplementedError("Encapsulation type not implemented") + + site_network_access["connection"] = connection + self.logger.info("Sending connection:{}".format(connection)) + vpn_attach = {} + vpn_attach["vpn-id"] = service_uuid + vpn_attach["site-role"] = vpn_service["svc-topo"] + "-role" + site_network_access["vpn-attachment"] = vpn_attach + self.logger.info("Sending vpn-attachement :{}".format(vpn_attach)) + uuid_sna = str(uuid.uuid4()) + site_network_access["network-access-id"] = uuid_sna + site_network_access["bearer"] = connection_point_wan_info[ + "service_mapping_info" + ]["bearer"] + + access_priority = connection_point_wan_info["service_mapping_info"].get("priority") + if access_priority is not None: + availability = {} + availability["access-priority"] = access_priority + availability["single-active"] = [None] + site_network_access["availability"] = availability + + constraint = {} + constraint['constraint-type'] = 'end-to-end-diverse' + constraint['target'] = {'all-other-accesses': [None]} + + access_diversity = {} + access_diversity['constraints'] = {'constraint': []} + access_diversity['constraints']['constraint'].append(constraint) + site_network_access["access-diversity"] = access_diversity + + site_network_accesses = {} + site_network_access_list = [] + site_network_access_list.append(site_network_access) + site_network_accesses[ + "ietf-l2vpn-svc:site-network-access" + ] = site_network_access_list + conn_info_d = {} + conn_info_d["site"] = connection_point_wan_info["service_mapping_info"][ + "site-id" + ] + conn_info_d["site-network-access-id"] = site_network_access[ + "network-access-id" + ] + conn_info_d["mapping"] = None + conn_info.append(conn_info_d) + + try: + endpoint_site_network_access_creation = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/" + "sites/site={}/site-network-accesses/".format( + self.wim["wim_url"], + connection_point_wan_info["service_mapping_info"][ + "site-id" + ], + ) + ) + response_endpoint_site_network_access_creation = requests.post( + endpoint_site_network_access_creation, + headers=self.headers, + json=site_network_accesses, + auth=self.auth, + ) + + if ( + response_endpoint_site_network_access_creation.status_code + == 409 + ): + self.delete_connectivity_service(vpn_service["vpn-id"]) + + raise SdnConnectorError( + "Site_Network_Access with ID '{}' already exists".format( + site_network_access["network-access-id"] + ), + http_code=response_endpoint_site_network_access_creation.status_code, + ) + elif ( + response_endpoint_site_network_access_creation.status_code + == 400 + ): + self.delete_connectivity_service(vpn_service["vpn-id"]) + + raise SdnConnectorError( + "Site {} does not exist".format( + connection_point_wan_info["service_mapping_info"][ + "site-id" + ] + ), + http_code=response_endpoint_site_network_access_creation.status_code, + ) + elif ( + response_endpoint_site_network_access_creation.status_code + != requests.codes.created + and response_endpoint_site_network_access_creation.status_code + != requests.codes.no_content + ): + self.delete_connectivity_service(vpn_service["vpn-id"]) + + raise SdnConnectorError( + "Request not accepted", + http_code=response_endpoint_site_network_access_creation.status_code, + ) + except requests.exceptions.ConnectionError: + self.delete_connectivity_service(vpn_service["vpn-id"]) + + raise SdnConnectorError("Request Timeout", http_code=408) + + return conn_info + + def delete_connectivity_service(self, service_uuid, conn_info=None): + """Disconnect multi-site endpoints previously connected + + This method should receive as the first argument the UUID generated by + the ``create_connectivity_service`` + """ + try: + self.logger.info("Sending delete") + servicepoint = "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services/vpn-service={}/".format( + self.wim["wim_url"], service_uuid + ) + response = requests.delete(servicepoint, auth=self.auth) + + if response.status_code != requests.codes.no_content: + raise SdnConnectorError( + "Error in the request", http_code=response.status_code + ) + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) + + def edit_connectivity_service( + self, service_uuid, conn_info=None, connection_points=None, **kwargs + ): + """Change an existing connectivity service, see + ``create_connectivity_service``""" + # sites = {"sites": {}} + # site_list = [] + vpn_service = {} + vpn_service["svc-topo"] = "any-to-any" + counter = 0 + + for connection_point in connection_points: + site_network_access = {} + connection_point_wan_info = self.search_mapp(connection_point) + params_site = {} + params_site["site-id"] = connection_point_wan_info["service_mapping_info"][ + "site-id" + ] + params_site["site-vpn-flavor"] = "site-vpn-flavor-single" + device_site = {} + device_site["device-id"] = connection_point_wan_info["device-id"] + params_site["devices"] = device_site + # network_access = {} + connection = {} + + if connection_point["service_endpoint_encapsulation_type"] != "none": + if connection_point["service_endpoint_encapsulation_type"] == "dot1q": + """The connection is a VLAN""" + connection["encapsulation-type"] = "dot1q-vlan-tagged" + tagged = {} + tagged_interf = {} + service_endpoint_encapsulation_info = connection_point[ + "service_endpoint_encapsulation_info" + ] + + if service_endpoint_encapsulation_info["vlan"] is None: + raise SdnConnectorError("VLAN must be provided") + + tagged_interf["cvlan-id"] = service_endpoint_encapsulation_info[ + "vlan" + ] + tagged["dot1q-vlan-tagged"] = tagged_interf + connection["tagged-interface"] = tagged + else: + raise NotImplementedError("Encapsulation type not implemented") + + site_network_access["connection"] = connection + vpn_attach = {} + vpn_attach["vpn-id"] = service_uuid + vpn_attach["site-role"] = vpn_service["svc-topo"] + "-role" + site_network_access["vpn-attachment"] = vpn_attach + uuid_sna = conn_info[counter]["site-network-access-id"] + site_network_access["network-access-id"] = uuid_sna + site_network_access["bearer"] = connection_point_wan_info[ + "service_mapping_info" + ]["bearer"] + site_network_accesses = {} + site_network_access_list = [] + site_network_access_list.append(site_network_access) + site_network_accesses[ + "ietf-l2vpn-svc:site-network-access" + ] = site_network_access_list + + try: + endpoint_site_network_access_edit = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/" + "sites/site={}/site-network-accesses/".format( + self.wim["wim_url"], + connection_point_wan_info["service_mapping_info"]["site-id"], + ) + ) + response_endpoint_site_network_access_creation = requests.put( + endpoint_site_network_access_edit, + headers=self.headers, + json=site_network_accesses, + auth=self.auth, + ) + + if response_endpoint_site_network_access_creation.status_code == 400: + raise SdnConnectorError( + "Service does not exist", + http_code=response_endpoint_site_network_access_creation.status_code, + ) + elif ( + response_endpoint_site_network_access_creation.status_code != 201 + and response_endpoint_site_network_access_creation.status_code + != 204 + ): + raise SdnConnectorError( + "Request no accepted", + http_code=response_endpoint_site_network_access_creation.status_code, + ) + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) + + counter += 1 + + return None + + def clear_all_connectivity_services(self): + """Delete all WAN Links corresponding to a WIM""" + try: + self.logger.info("Sending clear all connectivity services") + servicepoint = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services".format( + self.wim["wim_url"] + ) + ) + response = requests.delete(servicepoint, auth=self.auth) + + if response.status_code != requests.codes.no_content: + raise SdnConnectorError( + "Unable to clear all connectivity services", + http_code=response.status_code, + ) + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) + + def get_all_active_connectivity_services(self): + """Provide information about all active connections provisioned by a + WIM + """ + try: + self.logger.info("Sending get all connectivity services") + servicepoint = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services".format( + self.wim["wim_url"] + ) + ) + response = requests.get(servicepoint, auth=self.auth) + + if response.status_code != requests.codes.ok: + raise SdnConnectorError( + "Unable to get all connectivity services", + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) + + def get_connectivity_service(self, service_uuid, conn_info=None): + """Provide information about a specific connection provisioned by a WIM. + + This method should receive as the first argument the UUID generated by + the ``create_connectivity_service`` + """ + try: + self.logger.info("Sending get connectivity service") + servicepoint = ( + "{}/restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services/vpn-service={}/".format( + self.wim["wim_url"], service_uuid + ) + ) + response = requests.get(servicepoint, auth=self.auth) + + if response.status_code != requests.codes.ok: + raise SdnConnectorError( + "Unable to get connectivity service {:s}".format(str(service_uuid)), + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise SdnConnectorError("Request Timeout", http_code=408) diff --git a/src/device/service/drivers/ietf_l2vpn/__init__.py b/src/device/service/drivers/ietf_l2vpn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/device/service/drivers/ietf_l2vpn/acknowledgements.txt b/src/device/service/drivers/ietf_l2vpn/acknowledgements.txt new file mode 100644 index 0000000000000000000000000000000000000000..3a7ed47ad6626ad13f4176bd696ec7e7dbab20ee --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/acknowledgements.txt @@ -0,0 +1,3 @@ +IETF L2VPN Driver is based on source code taken from: +https://osm.etsi.org/gitlab/osm/ro/-/blob/master/RO-plugin/osm_ro_plugin/sdnconn.py +https://osm.etsi.org/gitlab/osm/ro/-/blob/master/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py diff --git a/src/device/service/drivers/ietf_l2vpn/sdnconn.py b/src/device/service/drivers/ietf_l2vpn/sdnconn.py new file mode 100644 index 0000000000000000000000000000000000000000..a1849c9ef3e1a1260ff42bbadabc99f91a6435d7 --- /dev/null +++ b/src/device/service/drivers/ietf_l2vpn/sdnconn.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +## +# Copyright 2018 University of Bristol - High Performance Networks Research +# Group +# All Rights Reserved. +# +# Contributors: Anderson Bravalheri, Dimitrios Gkounis, Abubakar Siddique +# Muqaddas, Navdeep Uniyal, Reza Nejabati and Dimitra Simeonidou +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact with: +# +# Neither the name of the University of Bristol nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# This work has been performed in the context of DCMS UK 5G Testbeds +# & Trials Programme and in the framework of the Metro-Haul project - +# funded by the European Commission under Grant number 761727 through the +# Horizon 2020 and 5G-PPP programmes. +## +"""The SDN connector is responsible for establishing both wide area network connectivity (WIM) +and intranet SDN connectivity. + +It receives information from ports to be connected . +""" + +import logging +from http import HTTPStatus + + +class SdnConnectorError(Exception): + """Base Exception for all connector related errors + provide the parameter 'http_code' (int) with the error code: + Bad_Request = 400 + Unauthorized = 401 (e.g. credentials are not valid) + Not_Found = 404 (e.g. try to edit or delete a non existing connectivity service) + Forbidden = 403 + Method_Not_Allowed = 405 + Not_Acceptable = 406 + Request_Timeout = 408 (e.g timeout reaching server, or cannot reach the server) + Conflict = 409 + Service_Unavailable = 503 + Internal_Server_Error = 500 + """ + + def __init__(self, message, http_code=HTTPStatus.INTERNAL_SERVER_ERROR.value): + Exception.__init__(self, message) + self.http_code = http_code + + +class SdnConnectorBase(object): + """Abstract base class for all the SDN connectors + + Arguments: + wim (dict): WIM record, as stored in the database + wim_account (dict): WIM account record, as stored in the database + config + The arguments of the constructor are converted to object attributes. + An extra property, ``service_endpoint_mapping`` is created from ``config``. + """ + + def __init__(self, wim, wim_account, config=None, logger=None): + """ + :param wim: (dict). Contains among others 'wim_url' + :param wim_account: (dict). Contains among others 'uuid' (internal id), 'name', + 'sdn' (True if is intended for SDN-assist or False if intended for WIM), 'user', 'password'. + :param config: (dict or None): Particular information of plugin. These keys if present have a common meaning: + 'mapping_not_needed': (bool) False by default or if missing, indicates that mapping is not needed. + 'service_endpoint_mapping': (list) provides the internal endpoint mapping. The meaning is: + KEY meaning for WIM meaning for SDN assist + -------- -------- -------- + device_id pop_switch_dpid compute_id + device_interface_id pop_switch_port compute_pci_address + service_endpoint_id wan_service_endpoint_id SDN_service_endpoint_id + service_mapping_info wan_service_mapping_info SDN_service_mapping_info + contains extra information if needed. Text in Yaml format + switch_dpid wan_switch_dpid SDN_switch_dpid + switch_port wan_switch_port SDN_switch_port + datacenter_id vim_account vim_account + id: (internal, do not use) + wim_id: (internal, do not use) + :param logger (logging.Logger): optional logger object. If none is passed 'openmano.sdn.sdnconn' is used. + """ + self.logger = logger or logging.getLogger("ro.sdn") + self.wim = wim + self.wim_account = wim_account + self.config = config or {} + self.service_endpoint_mapping = self.config.get("service_endpoint_mapping", []) + + def check_credentials(self): + """Check if the connector itself can access the SDN/WIM with the provided url (wim.wim_url), + user (wim_account.user), and password (wim_account.password) + + Raises: + SdnConnectorError: Issues regarding authorization, access to + external URLs, etc are detected. + """ + raise NotImplementedError + + def get_connectivity_service_status(self, service_uuid, conn_info=None): + """Monitor the status of the connectivity service established + + Arguments: + service_uuid (str): UUID of the connectivity service + conn_info (dict or None): Information returned by the connector + during the service creation/edition and subsequently stored in + the database. + + Returns: + dict: JSON/YAML-serializable dict that contains a mandatory key + ``sdn_status`` associated with one of the following values:: + + {'sdn_status': 'ACTIVE'} + # The service is up and running. + + {'sdn_status': 'INACTIVE'} + # The service was created, but the connector + # cannot determine yet if connectivity exists + # (ideally, the caller needs to wait and check again). + + {'sdn_status': 'DOWN'} + # Connection was previously established, + # but an error/failure was detected. + + {'sdn_status': 'ERROR'} + # An error occurred when trying to create the service/ + # establish the connectivity. + + {'sdn_status': 'BUILD'} + # Still trying to create the service, the caller + # needs to wait and check again. + + Additionally ``error_msg``(**str**) and ``sdn_info``(**dict**) + keys can be used to provide additional status explanation or + new information available for the connectivity service. + """ + raise NotImplementedError + + def create_connectivity_service(self, service_type, connection_points, **kwargs): + """ + Establish SDN/WAN connectivity between the endpoints + :param service_type: (str): ``ELINE`` (L2), ``ELAN`` (L2), ``ETREE`` (L2), ``L3``. + :param connection_points: (list): each point corresponds to + an entry point to be connected. For WIM: from the DC to the transport network. + For SDN: Compute/PCI to the transport network. One + connection point serves to identify the specific access and + some other service parameters, such as encapsulation type. + Each item of the list is a dict with: + "service_endpoint_id": (str)(uuid) Same meaning that for 'service_endpoint_mapping' (see __init__) + In case the config attribute mapping_not_needed is True, this value is not relevant. In this case + it will contain the string "device_id:device_interface_id" + "service_endpoint_encapsulation_type": None, "dot1q", ... + "service_endpoint_encapsulation_info": (dict) with: + "vlan": ..., (int, present if encapsulation is dot1q) + "vni": ... (int, present if encapsulation is vxlan), + "peers": [(ipv4_1), (ipv4_2)] (present if encapsulation is vxlan) + "mac": ... + "device_id": ..., same meaning that for 'service_endpoint_mapping' (see __init__) + "device_interface_id": same meaning that for 'service_endpoint_mapping' (see __init__) + "switch_dpid": ..., present if mapping has been found for this device_id,device_interface_id + "swith_port": ... present if mapping has been found for this device_id,device_interface_id + "service_mapping_info": present if mapping has been found for this device_id,device_interface_id + :param kwargs: For future versions: + bandwidth (int): value in kilobytes + latency (int): value in milliseconds + Other QoS might be passed as keyword arguments. + :return: tuple: ``(service_id, conn_info)`` containing: + - *service_uuid* (str): UUID of the established connectivity service + - *conn_info* (dict or None): Information to be stored at the database (or ``None``). + This information will be provided to the :meth:`~.edit_connectivity_service` and :obj:`~.delete`. + **MUST** be JSON/YAML-serializable (plain data structures). + :raises: SdnConnectorException: In case of error. Nothing should be created in this case. + Provide the parameter http_code + """ + raise NotImplementedError + + def delete_connectivity_service(self, service_uuid, conn_info=None): + """ + Disconnect multi-site endpoints previously connected + + :param service_uuid: The one returned by create_connectivity_service + :param conn_info: The one returned by last call to 'create_connectivity_service' or 'edit_connectivity_service' + if they do not return None + :return: None + :raises: SdnConnectorException: In case of error. The parameter http_code must be filled + """ + raise NotImplementedError + + def edit_connectivity_service( + self, service_uuid, conn_info=None, connection_points=None, **kwargs + ): + """Change an existing connectivity service. + + This method's arguments and return value follow the same convention as + :meth:`~.create_connectivity_service`. + + :param service_uuid: UUID of the connectivity service. + :param conn_info: (dict or None): Information previously returned by last call to create_connectivity_service + or edit_connectivity_service + :param connection_points: (list): If provided, the old list of connection points will be replaced. + :param kwargs: Same meaning that create_connectivity_service + :return: dict or None: Information to be updated and stored at the database. + When ``None`` is returned, no information should be changed. + When an empty dict is returned, the database record will be deleted. + **MUST** be JSON/YAML-serializable (plain data structures). + Raises: + SdnConnectorException: In case of error. + """ + + def clear_all_connectivity_services(self): + """Delete all WAN Links in a WIM. + + This method is intended for debugging only, and should delete all the + connections controlled by the WIM/SDN, not only the connections that + a specific RO is aware of. + + Raises: + SdnConnectorException: In case of error. + """ + raise NotImplementedError + + def get_all_active_connectivity_services(self): + """Provide information about all active connections provisioned by a + WIM. + + Raises: + SdnConnectorException: In case of error. + """ + raise NotImplementedError diff --git a/src/device/service/drivers/microwave/Tools.py b/src/device/service/drivers/microwave/Tools.py index 711fb55fd4bd9e1bcb16e851aa73f3a61f4bf4bd..4490c0f63fe6a517e5f31a5acd62208013bbaad0 100644 --- a/src/device/service/drivers/microwave/Tools.py +++ b/src/device/service/drivers/microwave/Tools.py @@ -14,7 +14,7 @@ import json, logging, requests from requests.auth import HTTPBasicAuth -from typing import Optional, Set +from typing import Dict, Optional, Set from device.service.driver_api._Driver import RESOURCE_ENDPOINTS LOGGER = logging.getLogger(__name__) @@ -43,6 +43,14 @@ def is_exportable_endpoint(node, termination_point_id, links): return False return True +VLAN_CLASSIFICATION_TYPES = {'ietf-eth-tran-types:vlan-classification', 'vlan-classification'} +OUTER_TAG_C_TYPE = {'ietf-eth-tran-types:classify-c-vlan', 'classify-c-vlan'} +def get_vlan_outer_tag(endpoint : Dict) -> Optional[int]: + if endpoint.get('service-classification-type', '') not in VLAN_CLASSIFICATION_TYPES: return None + outer_tag = endpoint.get('outer-tag', {}) + if outer_tag.get('tag-type', '') not in OUTER_TAG_C_TYPE: return None + return outer_tag.get('vlan-value') + def config_getter( root_url : str, resource_key : str, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None, node_ids : Set[str] = set() @@ -92,7 +100,35 @@ def config_getter( for service in service_instances: service_name = service['etht-svc-name'] resource_key = '/services/service[{:s}]'.format(service_name) - result.append((resource_key, service)) + resource_value = {'uuid': service.get('etht-svc-name', '')} + + for endpoint in service.get('etht-svc-end-points', []): + _vlan_id = get_vlan_outer_tag(endpoint) + if _vlan_id is not None: + vlan_id = resource_value.get('vlan_id') + if vlan_id is None: + resource_value['vlan_id'] = _vlan_id + elif vlan_id != _vlan_id: + raise Exception('Incompatible VLAN Ids: {:s}'.format(str(service))) + access_points = endpoint.get('etht-svc-access-points', []) + for access_point in access_points: + if access_point['access-point-id'] == '1': + resource_value['node_id_src'] = access_point['access-node-id'] + resource_value['tp_id_src'] = access_point['access-ltp-id'] + elif access_point['access-point-id'] == '2': + resource_value['node_id_dst'] = access_point['access-node-id'] + resource_value['tp_id_dst'] = access_point['access-ltp-id'] + + if len(node_ids) > 0: + node_id_src = resource_value.get('node_id_src') + if node_id_src is None: continue + if node_id_src not in node_ids: continue + + node_id_dst = resource_value.get('node_id_dst') + if node_id_dst is None: continue + if node_id_dst not in node_ids: continue + + result.append((resource_key, resource_value)) except requests.exceptions.Timeout: LOGGER.exception('Timeout connecting {:s}'.format(url)) except Exception as e: # pylint: disable=broad-except diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index ac03527529b603089c4f8233cb185f6427e0c360..569a0400ee709ebe3b0fa0694dd80801efc4f7fa 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -113,9 +113,11 @@ class NetconfSessionHandler: config, target=target, default_operation=default_operation, test_option=test_option, error_option=error_option, format=format) + @RETRY_DECORATOR def locked(self, target): return self.__manager.locked(target=target) + @RETRY_DECORATOR def commit(self, confirmed=False, timeout=None, persist=None, persist_id=None): return self.__manager.commit(confirmed=confirmed, timeout=timeout, persist=persist, persist_id=persist_id) diff --git a/src/device/service/drivers/openconfig/templates/EndPoints.py b/src/device/service/drivers/openconfig/templates/EndPoints.py index 02fda8f0e195c267fddb1109f184c8a06e4a6787..f16f0ffcd09a07f6c109328b1c5f0ee101af545a 100644 --- a/src/device/service/drivers/openconfig/templates/EndPoints.py +++ b/src/device/service/drivers/openconfig/templates/EndPoints.py @@ -55,5 +55,5 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: add_value_from_collection(endpoint, 'sample_types', sample_types) if len(endpoint) == 0: continue - response.append(('/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) + response.append(('/endpoints/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) return response diff --git a/src/device/service/drivers/transport_api/Tools.py b/src/device/service/drivers/transport_api/Tools.py index 4943648dcab21159b213f9ee938987995be61b0e..bbd4247f0debdd17885c5aadccafc32607e4cbe5 100644 --- a/src/device/service/drivers/transport_api/Tools.py +++ b/src/device/service/drivers/transport_api/Tools.py @@ -15,7 +15,7 @@ import json, logging, operator, requests from requests.auth import HTTPBasicAuth from typing import Optional -from device.service.driver_api._Driver import RESOURCE_ENDPOINTS +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES LOGGER = logging.getLogger(__name__) @@ -52,27 +52,74 @@ def config_getter( result.append((resource_key, e)) return result - if resource_key != RESOURCE_ENDPOINTS: return result - - if 'tapi-common:context' in context: - context = context['tapi-common:context'] - elif 'context' in context: - context = context['context'] - - for sip in context['service-interface-point']: - layer_protocol_name = sip.get('layer-protocol-name', '?') - supportable_spectrum = sip.get('tapi-photonic-media:media-channel-service-interface-point-spec', {}) - supportable_spectrum = supportable_spectrum.get('mc-pool', {}) - supportable_spectrum = supportable_spectrum.get('supportable-spectrum', []) - supportable_spectrum = supportable_spectrum[0] if len(supportable_spectrum) == 1 else {} - grid_type = supportable_spectrum.get('frequency-constraint', {}).get('grid-type') - granularity = supportable_spectrum.get('frequency-constraint', {}).get('adjustment-granularity') - direction = sip.get('direction', '?') - endpoint_type = [layer_protocol_name, grid_type, granularity, direction] - str_endpoint_type = ':'.join(filter(lambda i: operator.is_not(i, None), endpoint_type)) - endpoint_url = '/endpoints/endpoint[{:s}]'.format(sip['uuid']) - endpoint_data = {'uuid': sip['uuid'], 'type': str_endpoint_type} - result.append((endpoint_url, endpoint_data)) + if resource_key == RESOURCE_ENDPOINTS: + if 'tapi-common:context' in context: + context = context['tapi-common:context'] + elif 'context' in context: + context = context['context'] + + for sip in context['service-interface-point']: + layer_protocol_name = sip.get('layer-protocol-name', '?') + supportable_spectrum = sip.get('tapi-photonic-media:media-channel-service-interface-point-spec', {}) + supportable_spectrum = supportable_spectrum.get('mc-pool', {}) + supportable_spectrum = supportable_spectrum.get('supportable-spectrum', []) + supportable_spectrum = supportable_spectrum[0] if len(supportable_spectrum) == 1 else {} + grid_type = supportable_spectrum.get('frequency-constraint', {}).get('grid-type') + granularity = supportable_spectrum.get('frequency-constraint', {}).get('adjustment-granularity') + direction = sip.get('direction', '?') + + endpoint_type = [layer_protocol_name, grid_type, granularity, direction] + str_endpoint_type = ':'.join(filter(lambda i: operator.is_not(i, None), endpoint_type)) + sip_uuid = sip['uuid'] + + sip_names = sip.get('name', []) + sip_name = next(iter([ + sip_name['value'] + for sip_name in sip_names + if sip_name['value-name'] == 'local-name' + ]), sip_uuid) + + endpoint_url = '/endpoints/endpoint[{:s}]'.format(sip_uuid) + endpoint_data = {'uuid': sip_uuid, 'name': sip_name, 'type': str_endpoint_type} + result.append((endpoint_url, endpoint_data)) + + elif resource_key == RESOURCE_SERVICES: + if 'tapi-common:context' in context: + context = context['tapi-common:context'] + elif 'context' in context: + context = context['context'] + + if 'tapi-connectivity:connectivity-context' in context: + context = context['tapi-connectivity:connectivity-context'] + elif 'connectivity-context' in context: + context = context['connectivity-context'] + + for conn_svc in context['connectivity-service']: + service_uuid = conn_svc['uuid'] + constraints = conn_svc.get('connectivity-constraint', {}) + total_req_cap = constraints.get('requested-capacity', {}).get('total-size', {}) + + service_url = '/services/service[{:s}]'.format(service_uuid) + service_data = { + 'uuid': service_uuid, + 'direction': constraints.get('connectivity-direction', 'UNIDIRECTIONAL'), + 'capacity_unit': total_req_cap.get('unit', ''), + 'capacity_value': total_req_cap.get('value', ''), + } + + for i,endpoint in enumerate(conn_svc.get('end-point', [])): + layer_protocol_name = endpoint.get('layer-protocol-name') + if layer_protocol_name is not None: + service_data['layer_protocol_name'] = layer_protocol_name + + layer_protocol_qualifier = endpoint.get('layer-protocol-qualifier') + if layer_protocol_qualifier is not None: + service_data['layer_protocol_qualifier'] = layer_protocol_qualifier + + sip = endpoint['service-interface-point']['service-interface-point-uuid'] + service_data['input_sip' if i == 0 else 'output_sip'] = sip + + result.append((service_url, service_data)) return result diff --git a/src/device/service/drivers/transport_api/TransportApiDriver.py b/src/device/service/drivers/transport_api/TransportApiDriver.py index 8b84274e075e10af04924cefa03768d1c340fb52..1991a34d0d797c48b6c2296435c0ebd0f3a8125a 100644 --- a/src/device/service/drivers/transport_api/TransportApiDriver.py +++ b/src/device/service/drivers/transport_api/TransportApiDriver.py @@ -85,9 +85,9 @@ class TransportApiDriver(_Driver): for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - input_sip = find_key(resource, 'input_sip') - output_sip = find_key(resource, 'output_sip') uuid = find_key(resource, 'uuid') + input_sip = find_key(resource, 'input_sip_uuid') + output_sip = find_key(resource, 'output_sip_uuid') capacity_value = find_key(resource, 'capacity_value') capacity_unit = find_key(resource, 'capacity_unit') layer_protocol_name = find_key(resource, 'layer_protocol_name') diff --git a/src/device/service/drivers/transport_api/__init__.py b/src/device/service/drivers/transport_api/__init__.py index 2d3f6df3276f063cd9b414f47bba41b656682049..d5073c330b89bed63f08b0da86c4a7649c87b3dd 100644 --- a/src/device/service/drivers/transport_api/__init__.py +++ b/src/device/service/drivers/transport_api/__init__.py @@ -12,16 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES ALL_RESOURCE_KEYS = [ RESOURCE_ENDPOINTS, - RESOURCE_INTERFACES, - RESOURCE_NETWORK_INSTANCES, + RESOURCE_SERVICES, ] - -RESOURCE_KEY_MAPPINGS = { - RESOURCE_ENDPOINTS : 'component', - RESOURCE_INTERFACES : 'interface', - RESOURCE_NETWORK_INSTANCES: 'network_instance', -} diff --git a/src/device/service/drivers/xr/XrDriver.py b/src/device/service/drivers/xr/XrDriver.py index 3114bcc2c859a9e5a94c7d177c7a7cf59c25a7c4..c1471a8136b0e5cd7791e019bb0bdafd2252f591 100644 --- a/src/device/service/drivers/xr/XrDriver.py +++ b/src/device/service/drivers/xr/XrDriver.py @@ -16,10 +16,13 @@ import logging import threading import json -from typing import Any, Iterator, List, Optional, Tuple, Union +from typing import Any, Iterator, List, Optional, Set, Tuple, Union import urllib3 +from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import DeviceDriverEnum, DeviceOperationalStatusEnum from common.type_checkers.Checkers import chk_type +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology from device.service.driver_api._Driver import _Driver from .cm.cm_connection import CmConnection, ConsistencyMode from .cm import tf @@ -46,6 +49,14 @@ class XrDriver(_Driver): username = settings.get("username", "xr-user-1") password = settings.get("password", "xr-user-1") + # Options are: + # disabled --> just import endpoints as usual + # devices --> imports sub-devices but not links connecting them. + # (a remotely-controlled transport domain might exist between them) + # topology --> imports sub-devices and links connecting them. + # (not supported by XR driver) + self.__import_topology = get_import_topology(settings, default=ImportTopologyEnum.DISABLED) + # Options are: # asynchronous --> operation considered complete when IPM responds with suitable status code, # including "accepted", that only means request is semantically good and queued. @@ -99,7 +110,56 @@ class XrDriver(_Driver): constellation = self.__cm_connection.get_constellation_by_hub_name(self.__hub_module_name) if constellation: self.__constellation = constellation - return [(f"/endpoints/endpoint[{ifname}]", {'uuid': ifname, 'type': 'optical', 'sample_types': {}}) for ifname in constellation.ifnames()] + if self.__import_topology == ImportTopologyEnum.DISABLED: + return [ + (f"/endpoints/endpoint[{ifname}]", {'uuid': ifname, 'type': 'optical', 'sample_types': {}}) + for ifname in constellation.ifnames() + ] + elif self.__import_topology == ImportTopologyEnum.DEVICES: + devices : Set[str] = set() + pluggables : Set[str] = set() + devices_and_endpoints = [] + for ifname in constellation.ifnames(): + device_name,pluggable_name = ifname.split('|') + + if device_name not in devices: + device_url = '/devices/device[{:s}]'.format(device_name) + device_data = { + 'uuid': device_name, 'name': device_name, + 'type': DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, + 'status': DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED, + 'drivers': [DeviceDriverEnum.DEVICEDRIVER_UNDEFINED], + } + devices_and_endpoints.append((device_url, device_data)) + + for copper_if_index in range(4): + copper_ifname = '1/{:d}'.format(copper_if_index + 1) + endpoint_url = '/endpoints/endpoint[{:s}]'.format(copper_ifname) + endpoint_data = { + 'device_uuid': device_name, 'uuid': copper_ifname, 'name': copper_ifname, + 'type': 'copper/internal', 'sample_types': {} + } + devices_and_endpoints.append((endpoint_url, endpoint_data)) + + devices.add(device_name) + + if ifname not in pluggables: + endpoint_url = '/endpoints/endpoint[{:s}]'.format(ifname) + if 'hub' in ifname.lower(): + endpoint_type = 'optical/xr-hub' + elif 'leaf' in ifname.lower(): + endpoint_type = 'optical/xr-leaf' + else: + endpoint_type = 'optical/xr' + endpoint_data = { + 'device_uuid': device_name, 'uuid': pluggable_name, 'name': pluggable_name, + 'type': endpoint_type, 'sample_types': {} + } + devices_and_endpoints.append((endpoint_url, endpoint_data)) + + return devices_and_endpoints + else: + raise Exception('Unsupported import_topology mode: {:s}'.format(str(self.__import_topology))) else: return [] diff --git a/src/device/service/drivers/xr/cm-cli.py b/src/device/service/drivers/xr/cm-cli.py index 6e9dc83873a9fd1638751df730385832561d3a98..9aefe969c0549819568882a6215ae3dd86b7df3b 100755 --- a/src/device/service/drivers/xr/cm-cli.py +++ b/src/device/service/drivers/xr/cm-cli.py @@ -179,8 +179,8 @@ try: hub_module_name, uuid, input_sip, output_sip, capacity_value = eargs[0:5] capacity_value = int(capacity_value) config = { - "input_sip": input_sip, - "output_sip": output_sip, + "input_sip_name": input_sip, + "output_sip_name": output_sip, "capacity_value": capacity_value, "capacity_unit": "gigabit" } diff --git a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py index bea9b4c98e3c22fdfe020d1d8f628997161a3d85..42785caad79f4ba6000877e81d3caf403c463c1a 100644 --- a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py +++ b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py @@ -44,8 +44,8 @@ def mock_cm(): uuid = "12345ABCDEFGHIJKLMN" config = { - "input_sip": "XR HUB 1|XR-T4;", - "output_sip": "XR LEAF 1|XR-T1", + "input_sip_name": "XR HUB 1|XR-T4;", + "output_sip_name": "XR LEAF 1|XR-T1", "capacity_value": 125, "capacity_unit": "gigabit" } diff --git a/src/device/service/drivers/xr/cm/tf.py b/src/device/service/drivers/xr/cm/tf.py index 0177346a0609e80847387481f527a6f574718bef..4b1352216d79aea46beca8c5383f64f39869f91b 100644 --- a/src/device/service/drivers/xr/cm/tf.py +++ b/src/device/service/drivers/xr/cm/tf.py @@ -38,7 +38,7 @@ def _get_capacity(config) -> int: def set_config_for_service(cm_connection: CmConnection, constellation: Constellation, uuid: str, config: Dict[str, any]) -> Union[bool, Exception]: try: - service = TFService(uuid, config["input_sip"], config["output_sip"], _get_capacity(config)) + service = TFService(uuid, config["input_sip_name"], config["output_sip_name"], _get_capacity(config)) if constellation.is_vti_mode(): desired_tc = TransportCapacity(from_tf_service=service) active_tc = cm_connection.get_transport_capacity_by_name(service.name()) diff --git a/src/pathcomp/backend/pathComp_RESTapi.c b/src/pathcomp/backend/pathComp_RESTapi.c index 8ee7f6d82537b7eab297334a0a0dcfad13f8af44..82d4b38a840cf813dab850c4cb136ff05b503cbd 100644 --- a/src/pathcomp/backend/pathComp_RESTapi.c +++ b/src/pathcomp/backend/pathComp_RESTapi.c @@ -1211,7 +1211,9 @@ void parsing_json_obj_pathComp_request(cJSON * root, GIOChannel * source) // In the context information, if solely the list of links are passed for a single direction, // the reverse direction MUST be created sythetically - generate_reverse_linkList(); + + // LGR: deactivated; link duplication needs to be done smartly with TAPI. done manually in topology by now + //generate_reverse_linkList(); } return; } diff --git a/src/pathcomp/backend/pathComp_sp.c b/src/pathcomp/backend/pathComp_sp.c index 447b0d2a6d002d12808f80c855c74f8d0b489743..b143b04933f1ac9099af3edf3af087cc58e32c5b 100644 --- a/src/pathcomp/backend/pathComp_sp.c +++ b/src/pathcomp/backend/pathComp_sp.c @@ -296,8 +296,8 @@ void sp_execution_services(struct compRouteOutputList_t* oPathList) continue; } struct path_t* path = &(pathService->paths[pathService->numPaths - 1]); - allocate_graph_resources(path, service, g); - allocate_graph_reverse_resources(path, service, g); + //allocate_graph_resources(path, service, g); // LGR: crashes in some cases with assymetric topos + //allocate_graph_reverse_resources(path, service, g); // LGR: crashes in some cases with assymetric topos print_graph(g); } return; diff --git a/src/pathcomp/backend/pathComp_tools.h b/src/pathcomp/backend/pathComp_tools.h index b6bcea04c8aa01b6cf730460e0075327f872f344..b770788910a04f76a8625a7e2d74fca5f2f6ecad 100644 --- a/src/pathcomp/backend/pathComp_tools.h +++ b/src/pathcomp/backend/pathComp_tools.h @@ -117,7 +117,7 @@ struct map_nodes_t { }; #define MAX_NUM_VERTICES 20 // 100 # LGR: reduced from 100 to 20 to divide by 5 the memory used -#define MAX_NUM_EDGES 40 // 100 # LGR: reduced from 100 to 40 to divide by 2.5 the memory used +#define MAX_NUM_EDGES 5 // 100 # LGR: reduced from 100 to 5 to divide by 20 the memory used // Structures for the graph composition struct targetNodes_t { // remote / targeted node @@ -247,7 +247,7 @@ struct endPoint_t { // Structure for the device contents /////////////////////////////////////////////////////////////////// #define MAX_DEV_TYPE_SIZE 128 -#define MAX_DEV_ENDPOINT_LENGTH 40 // 10 # LGR: controllers might have large number of endpoints +#define MAX_DEV_ENDPOINT_LENGTH 50 // 10 # LGR: controllers might have large number of endpoints struct device_t { gchar deviceId[UUID_CHAR_LENGTH]; // device ID using UUID (128 bits) diff --git a/src/pathcomp/frontend/service/algorithms/_Algorithm.py b/src/pathcomp/frontend/service/algorithms/_Algorithm.py index b6316774921171eb8ed6cf3faafd4b607bdcb831..b486ec1b59457b1ac575fb6197c7713b10c306e3 100644 --- a/src/pathcomp/frontend/service/algorithms/_Algorithm.py +++ b/src/pathcomp/frontend/service/algorithms/_Algorithm.py @@ -15,17 +15,20 @@ import json, logging, requests from typing import Dict, List, Optional, Tuple, Union from common.proto.context_pb2 import ( - ConfigRule, Connection, Device, DeviceList, EndPointId, Link, LinkList, Service, ServiceStatusEnum, - ServiceTypeEnum) + Connection, Device, DeviceList, EndPointId, Link, LinkList, Service, ServiceStatusEnum, ServiceTypeEnum) from common.proto.pathcomp_pb2 import PathCompReply, PathCompRequest -from common.tools.object_factory.ConfigRule import json_config_rule_set from pathcomp.frontend.Config import BACKEND_URL -from pathcomp.frontend.service.algorithms.tools.ConstantsMappings import DEVICE_LAYER_TO_SERVICE_TYPE, DeviceLayerEnum from .tools.EroPathToHops import eropath_to_hops +from .tools.ComposeConfigRules import ( + compose_device_config_rules, compose_l2nm_config_rules, compose_l3nm_config_rules, compose_tapi_config_rules) from .tools.ComposeRequest import compose_device, compose_link, compose_service from .tools.ComputeSubServices import ( convert_explicit_path_hops_to_connections, convert_explicit_path_hops_to_plain_connection) +SRC_END = 'src' +DST_END = 'dst' +SENSE = [SRC_END, DST_END] + class _Algorithm: def __init__(self, algorithm_id : str, sync_paths : bool, class_name=__name__) -> None: # algorithm_id: algorithm to be executed @@ -45,7 +48,7 @@ class _Algorithm: self.endpoint_name_mapping : Dict[Tuple[str, str], str] = dict() self.link_list : List[Dict] = list() self.link_dict : Dict[str, Tuple[Dict, Link]] = dict() - self.endpoint_to_link_dict : Dict[Tuple[str, str], Tuple[Dict, Link]] = dict() + self.endpoint_to_link_dict : Dict[Tuple[str, str, str], Tuple[Dict, Link]] = dict() self.service_list : List[Dict] = list() self.service_dict : Dict[Tuple[str, str], Tuple[Dict, Service]] = dict() @@ -61,6 +64,7 @@ class _Algorithm: _device_uuid = grpc_device.device_id.device_uuid.uuid _device_name = grpc_device.name self.device_name_mapping[_device_name] = _device_uuid + self.device_name_mapping[_device_uuid] = _device_uuid device_endpoint_dict : Dict[str, Tuple[Dict, EndPointId]] = dict() for json_endpoint,grpc_endpoint in zip(json_device['device_endpoints'], grpc_device.device_endpoints): @@ -72,12 +76,16 @@ class _Algorithm: _endpoint_name = grpc_endpoint.name self.endpoint_name_mapping[(_device_uuid, _endpoint_name)] = _endpoint_uuid self.endpoint_name_mapping[(_device_name, _endpoint_name)] = _endpoint_uuid + self.endpoint_name_mapping[(_device_uuid, _endpoint_uuid)] = _endpoint_uuid + self.endpoint_name_mapping[(_device_name, _endpoint_uuid)] = _endpoint_uuid self.endpoint_dict[device_uuid] = device_endpoint_dict def add_links(self, grpc_links : Union[List[Link], LinkList]) -> None: if isinstance(grpc_links, LinkList): grpc_links = grpc_links.links for grpc_link in grpc_links: + if 'mgmt' in grpc_link.name.lower(): continue + json_link = compose_link(grpc_link) if len(json_link['link_endpoint_ids']) != 2: continue self.link_list.append(json_link) @@ -85,11 +93,11 @@ class _Algorithm: link_uuid = json_link['link_Id'] self.link_dict[link_uuid] = (json_link, grpc_link) - for link_endpoint_id in json_link['link_endpoint_ids']: + for i,link_endpoint_id in enumerate(json_link['link_endpoint_ids']): link_endpoint_id = link_endpoint_id['endpoint_id'] device_uuid = link_endpoint_id['device_id'] endpoint_uuid = link_endpoint_id['endpoint_uuid'] - endpoint_key = (device_uuid, endpoint_uuid) + endpoint_key = (device_uuid, endpoint_uuid, SENSE[i]) link_tuple = (json_link, grpc_link) self.endpoint_to_link_dict[endpoint_key] = link_tuple @@ -148,9 +156,8 @@ class _Algorithm: return connection def add_service_to_reply( - self, reply : PathCompReply, context_uuid : str, service_uuid : str, - device_layer : Optional[DeviceLayerEnum] = None, path_hops : List[Dict] = [], - config_rules : List = [] + self, reply : PathCompReply, context_uuid : str, service_uuid : str, service_type : ServiceTypeEnum, + path_hops : List[Dict] = [], config_rules : List = [] ) -> Service: # TODO: implement support for multi-point services # Control deactivated to enable disjoint paths with multiple redundant endpoints on each side @@ -159,44 +166,43 @@ class _Algorithm: service_key = (context_uuid, service_uuid) tuple_service = self.service_dict.get(service_key) - if tuple_service is not None: - service = reply.services.add() - service.CopyFrom(tuple_service[1]) + + service = reply.services.add() + service.service_id.context_id.context_uuid.uuid = context_uuid + service.service_id.service_uuid.uuid = service_uuid + service.service_type = service_type + + if service_type == ServiceTypeEnum.SERVICETYPE_L2NM: + compose_l2nm_config_rules(config_rules, service.service_config.config_rules) + elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM: + compose_l3nm_config_rules(config_rules, service.service_config.config_rules) + elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + compose_tapi_config_rules(config_rules, service.service_config.config_rules) else: - service = reply.services.add() - service.service_id.context_id.context_uuid.uuid = context_uuid - service.service_id.service_uuid.uuid = service_uuid - - if device_layer is not None: - service_type = DEVICE_LAYER_TO_SERVICE_TYPE.get(device_layer.value) - if service_type is None: - MSG = 'Unable to map DeviceLayer({:s}) to ServiceType' - raise Exception(MSG.format(str(device_layer))) - service.service_type = service_type - - if service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: - json_tapi_settings = { - 'capacity_value' : 50.0, - 'capacity_unit' : 'GHz', - 'layer_proto_name': 'PHOTONIC_MEDIA', - 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', - 'direction' : 'UNIDIRECTIONAL', - } - config_rule = ConfigRule(**json_config_rule_set('/settings', json_tapi_settings)) - service.service_config.config_rules.append(config_rule) - else: - service.service_config.config_rules.extend(config_rules) + MSG = 'Unhandled generic Config Rules for service {:s} {:s}' + self.logger.warning(MSG.format(str(service_uuid), str(ServiceTypeEnum.Name(service_type)))) - service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + compose_device_config_rules( + config_rules, service.service_config.config_rules, path_hops, + self.device_name_mapping, self.endpoint_name_mapping) - if path_hops is not None and len(path_hops) > 0: - ingress_endpoint_id = service.service_endpoint_ids.add() - ingress_endpoint_id.device_id.device_uuid.uuid = path_hops[0]['device'] - ingress_endpoint_id.endpoint_uuid.uuid = path_hops[0]['ingress_ep'] + if path_hops is not None and len(path_hops) > 0: + ingress_endpoint_id = service.service_endpoint_ids.add() + ingress_endpoint_id.device_id.device_uuid.uuid = path_hops[0]['device'] + ingress_endpoint_id.endpoint_uuid.uuid = path_hops[0]['ingress_ep'] - egress_endpoint_id = service.service_endpoint_ids.add() - egress_endpoint_id.device_id.device_uuid.uuid = path_hops[-1]['device'] - egress_endpoint_id.endpoint_uuid.uuid = path_hops[-1]['egress_ep'] + egress_endpoint_id = service.service_endpoint_ids.add() + egress_endpoint_id.device_id.device_uuid.uuid = path_hops[-1]['device'] + egress_endpoint_id.endpoint_uuid.uuid = path_hops[-1]['egress_ep'] + + if tuple_service is None: + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + else: + service.name = tuple_service[1].name + service.service_status.CopyFrom(tuple_service[1].service_status) + service.timestamp.CopyFrom(tuple_service[1].timestamp) + for constraint in tuple_service[1].service_constraints: + service.service_constraints.add().CopyFrom(constraint) return service @@ -206,41 +212,54 @@ class _Algorithm: grpc_services : Dict[Tuple[str, str], Service] = {} grpc_connections : Dict[str, Connection] = {} for response in response_list: - service_id = response['serviceId'] - context_uuid = service_id['contextId'] - service_uuid = service_id['service_uuid'] - service_key = (context_uuid, service_uuid) - upper_service = self.add_service_to_reply(reply, context_uuid, service_uuid) - grpc_services[service_key] = upper_service + orig_service_id = response['serviceId'] + context_uuid = orig_service_id['contextId'] + main_service_uuid = orig_service_id['service_uuid'] + orig_service_key = (context_uuid, main_service_uuid) + _,grpc_orig_service = self.service_dict[orig_service_key] + main_service_type = grpc_orig_service.service_type no_path_issue = response.get('noPath', {}).get('issue') if no_path_issue is not None: # no path found: leave connection with no endpoints # no_path_issue == 1 => no path due to a constraint + grpc_services[orig_service_key] = grpc_orig_service continue + orig_config_rules = grpc_orig_service.service_config.config_rules + for service_path_ero in response['path']: + self.logger.debug('service_path_ero["devices"] = {:s}'.format(str(service_path_ero['devices']))) + _endpoint_to_link_dict = {k:v[0] for k,v in self.endpoint_to_link_dict.items()} + self.logger.debug('self.endpoint_to_link_dict = {:s}'.format(str(_endpoint_to_link_dict))) path_hops = eropath_to_hops(service_path_ero['devices'], self.endpoint_to_link_dict) + self.logger.debug('path_hops = {:s}'.format(str(path_hops))) try: - connections = convert_explicit_path_hops_to_connections(path_hops, self.device_dict, service_uuid) + _device_dict = {k:v[0] for k,v in self.device_dict.items()} + self.logger.debug('self.device_dict = {:s}'.format(str(_device_dict))) + connections = convert_explicit_path_hops_to_connections( + path_hops, self.device_dict, main_service_uuid, main_service_type) + self.logger.debug('EXTRAPOLATED connections = {:s}'.format(str(connections))) except: # pylint: disable=bare-except - # if not able to extrapolate sub-services and sub-connections, - # assume single service and single connection - connections = convert_explicit_path_hops_to_plain_connection(path_hops, service_uuid) + MSG = ' '.join([ + 'Unable to Extrapolate sub-services and sub-connections.', + 'Assuming single-service and single-connection.', + ]) + self.logger.exception(MSG) + connections = convert_explicit_path_hops_to_plain_connection( + path_hops, main_service_uuid, main_service_type) + self.logger.debug('BASIC connections = {:s}'.format(str(connections))) for connection in connections: - connection_uuid,device_layer,path_hops,_ = connection + connection_uuid,service_type,path_hops,_ = connection service_key = (context_uuid, connection_uuid) - grpc_service = grpc_services.get(service_key) - if grpc_service is None: - config_rules = upper_service.service_config.config_rules - grpc_service = self.add_service_to_reply( - reply, context_uuid, connection_uuid, device_layer=device_layer, path_hops=path_hops, - config_rules=config_rules) - grpc_services[service_key] = grpc_service + grpc_service = self.add_service_to_reply( + reply, context_uuid, connection_uuid, service_type, path_hops=path_hops, + config_rules=orig_config_rules) + grpc_services[service_key] = grpc_service for connection in connections: - connection_uuid,device_layer,path_hops,dependencies = connection + connection_uuid,_,path_hops,dependencies = connection service_key = (context_uuid, connection_uuid) grpc_service = grpc_services.get(service_key) @@ -251,8 +270,8 @@ class _Algorithm: grpc_connection = self.add_connection_to_reply(reply, connection_uuid, grpc_service, path_hops) grpc_connections[connection_uuid] = grpc_connection - for service_uuid in dependencies: - sub_service_key = (context_uuid, service_uuid) + for sub_service_uuid in dependencies: + sub_service_key = (context_uuid, sub_service_uuid) grpc_sub_service = grpc_services.get(sub_service_key) if grpc_sub_service is None: raise Exception('Service({:s}) not found'.format(str(sub_service_key))) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py new file mode 100644 index 0000000000000000000000000000000000000000..91367e23f29a02aa3e9605fcd0d2864b9191d800 --- /dev/null +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import itertools, json, re +from typing import Dict, List, Optional, Tuple +from common.proto.context_pb2 import ConfigRule +from common.tools.object_factory.ConfigRule import json_config_rule_set + +SETTINGS_RULE_NAME = '/settings' + +DEV_EP_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/endpoint\[([^\]]+)\]\/settings') + +L2NM_SETTINGS_FIELD_DEFAULTS = { + 'encapsulation_type': 'dot1q', + 'vlan_id' : 100, + 'mtu' : 1450, +} + +L3NM_SETTINGS_FIELD_DEFAULTS = { + 'encapsulation_type': 'dot1q', + 'vlan_id' : 100, + 'mtu' : 1450, +} + +TAPI_SETTINGS_FIELD_DEFAULTS = { + 'capacity_value' : 50.0, + 'capacity_unit' : 'GHz', + 'layer_proto_name': 'PHOTONIC_MEDIA', + 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', + 'direction' : 'UNIDIRECTIONAL', +} + +def find_custom_config_rule(config_rules : List, resource_name : str) -> Optional[Dict]: + resource_value : Optional[Dict] = None + for config_rule in config_rules: + if config_rule.WhichOneof('config_rule') != 'custom': continue + if config_rule.custom.resource_key != resource_name: continue + resource_value = json.loads(config_rule.custom.resource_value) + return resource_value + +def compose_config_rules( + main_service_config_rules : List, subservice_config_rules : List, field_defaults : Dict +) -> None: + settings = find_custom_config_rule(main_service_config_rules, SETTINGS_RULE_NAME) + if settings is None: return + + json_settings = {} + for field_name,default_value in field_defaults.items(): + json_settings[field_name] = settings.get(field_name, default_value) + + config_rule = ConfigRule(**json_config_rule_set('/settings', json_settings)) + subservice_config_rules.append(config_rule) + +def compose_l2nm_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: + compose_config_rules(main_service_config_rules, subservice_config_rules, L2NM_SETTINGS_FIELD_DEFAULTS) + +def compose_l3nm_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: + compose_config_rules(main_service_config_rules, subservice_config_rules, L3NM_SETTINGS_FIELD_DEFAULTS) + +def compose_tapi_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: + compose_config_rules(main_service_config_rules, subservice_config_rules, TAPI_SETTINGS_FIELD_DEFAULTS) + +def compose_device_config_rules( + config_rules : List, subservice_config_rules : List, path_hops : List, + device_name_mapping : Dict[str, str], endpoint_name_mapping : Dict[Tuple[str, str], str] +) -> None: + + endpoints_traversed = set() + for path_hop in path_hops: + device_uuid_or_name = path_hop['device'] + endpoints_traversed.add((device_uuid_or_name, path_hop['ingress_ep'])) + endpoints_traversed.add((device_uuid_or_name, path_hop['egress_ep'])) + + for config_rule in config_rules: + if config_rule.WhichOneof('config_rule') != 'custom': continue + match = DEV_EP_SETTINGS.match(config_rule.custom.resource_key) + if match is None: continue + + device_uuid_or_name = match.group(1) + device_name_or_uuid = device_name_mapping[device_uuid_or_name] + device_keys = {device_uuid_or_name, device_name_or_uuid} + + endpoint_uuid_or_name = match.group(2) + endpoint_name_or_uuid_1 = endpoint_name_mapping[(device_uuid_or_name, endpoint_uuid_or_name)] + endpoint_name_or_uuid_2 = endpoint_name_mapping[(device_name_or_uuid, endpoint_uuid_or_name)] + endpoint_keys = {endpoint_uuid_or_name, endpoint_name_or_uuid_1, endpoint_name_or_uuid_2} + + device_endpoint_keys = set(itertools.product(device_keys, endpoint_keys)) + if len(device_endpoint_keys.intersection(endpoints_traversed)) == 0: continue + subservice_config_rules.append(config_rule) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index ee85f0bb083500c655e78798bbcd2bd00e8a4501..e2c6dc13804703d89242b27156763ce887aa4884 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -118,11 +118,11 @@ def compose_link(grpc_link : Link) -> Dict: for link_endpoint_id in grpc_link.link_endpoint_ids ] - forwarding_direction = LinkForwardingDirection.BIDIRECTIONAL.value + forwarding_direction = LinkForwardingDirection.UNIDIRECTIONAL.value total_potential_capacity = compose_capacity(200, CapacityUnit.MBPS.value) available_capacity = compose_capacity(200, CapacityUnit.MBPS.value) cost_characteristics = compose_cost_characteristics('linkcost', '1', '0') - latency_characteristics = compose_latency_characteristics('2') + latency_characteristics = compose_latency_characteristics('1') return { 'link_Id': link_uuid, 'link_endpoint_ids': endpoint_ids, 'forwarding_direction': forwarding_direction, diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index b92a19b52c4887e01f7f1bc58de897c783683eeb..40cb0857617983df4cfd926baebcbff85e169894 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -30,55 +30,77 @@ # ] # # connections=[ -# (UUID('7548edf7-ee7c-4adf-ac0f-c7a0c0dfba8e'), , [ +# (UUID('7548edf7-ee7c-4adf-ac0f-c7a0c0dfba8e'), ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, [ # {'device': 'TN-OLS', 'ingress_ep': '833760219d0f', 'egress_ep': 'cf176771a4b9'} # ], []), -# (UUID('c2e57966-5d82-4705-a5fe-44cf6487219e'), , [ +# (UUID('c2e57966-5d82-4705-a5fe-44cf6487219e'), ServiceTypeEnum.SERVICETYPE_L2NM, [ # {'device': 'CS1-GW1', 'ingress_ep': '10/1', 'egress_ep': '1/2'}, # {'device': 'TN-R2', 'ingress_ep': '1/2', 'egress_ep': '2/1'}, # {'device': 'TN-R3', 'ingress_ep': '2/1', 'egress_ep': '1/1'}, # {'device': 'CS2-GW1', 'ingress_ep': '1/1', 'egress_ep': '10/1'} # ], [UUID('7548edf7-ee7c-4adf-ac0f-c7a0c0dfba8e')]), -# (UUID('1e205c82-f6ea-4977-9e97-dc27ef1f4802'), , [ +# (UUID('1e205c82-f6ea-4977-9e97-dc27ef1f4802'), ServiceTypeEnum.SERVICETYPE_L2NM, [ # {'device': 'DC1-GW', 'ingress_ep': 'int', 'egress_ep': 'eth1'}, # {'device': 'DC2-GW', 'ingress_ep': 'eth1', 'egress_ep': 'int'} # ], [UUID('c2e57966-5d82-4705-a5fe-44cf6487219e')]) # ] -import queue, uuid -from typing import Dict, List, Tuple -from common.proto.context_pb2 import Device -from .ConstantsMappings import DEVICE_TYPE_TO_LAYER, DeviceLayerEnum +import logging, queue, uuid +from typing import Dict, List, Optional, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import Device, ServiceTypeEnum +from .ResourceGroups import IGNORED_DEVICE_TYPES, get_resource_classification +from .ServiceTypes import get_service_type + +LOGGER = logging.getLogger(__name__) def convert_explicit_path_hops_to_connections( - path_hops : List[Dict], device_dict : Dict[str, Tuple[Dict, Device]], main_connection_uuid : str -) -> List[Tuple[str, DeviceLayerEnum, List[str], List[str]]]: + path_hops : List[Dict], device_dict : Dict[str, Tuple[Dict, Device]], + main_service_uuid : str, main_service_type : ServiceTypeEnum +) -> List[Tuple[str, int, List[str], List[str]]]: + + LOGGER.debug('path_hops={:s}'.format(str(path_hops))) connection_stack = queue.LifoQueue() - connections : List[Tuple[str, DeviceLayerEnum, List[str], List[str]]] = list() - old_device_layer = None - last_device_uuid = None + connections : List[Tuple[str, int, List[str], List[str]]] = list() + prv_device_uuid = None + prv_res_class : Tuple[Optional[int], Optional[DeviceTypeEnum], Optional[str]] = None, None, None + for path_hop in path_hops: device_uuid = path_hop['device'] - if last_device_uuid == device_uuid: continue + if prv_device_uuid == device_uuid: continue device_tuple = device_dict.get(device_uuid) if device_tuple is None: raise Exception('Device({:s}) not found'.format(str(device_uuid))) - json_device,_ = device_tuple - device_type = json_device['device_type'] - device_layer = DEVICE_TYPE_TO_LAYER.get(device_type) - if device_layer is None: raise Exception('Undefined Layer for DeviceType({:s})'.format(str(device_type))) + _,grpc_device = device_tuple - if old_device_layer is None: + res_class = get_resource_classification(grpc_device, device_dict) + if res_class[1] in IGNORED_DEVICE_TYPES: continue + + if prv_res_class[0] is None: # path ingress - connection_stack.put((main_connection_uuid, device_layer, [path_hop], [])) - elif old_device_layer > device_layer: - # underlying connection begins + connection_stack.put((main_service_uuid, main_service_type, [path_hop], [])) + elif prv_res_class[0] > res_class[0]: + # create underlying connection connection_uuid = str(uuid.uuid4()) - connection_stack.put((connection_uuid, device_layer, [path_hop], [])) - elif old_device_layer == device_layer: - # same connection continues - connection_stack.queue[-1][2].append(path_hop) - elif old_device_layer < device_layer: + prv_service_type = connection_stack.queue[-1][1] + service_type = get_service_type(res_class[1], prv_service_type) + connection_stack.put((connection_uuid, service_type, [path_hop], [])) + elif prv_res_class[0] == res_class[0]: + # same resource group kind + if prv_res_class[1] == res_class[1] and prv_res_class[2] == res_class[2]: + # same device type and device controller: connection continues + connection_stack.queue[-1][2].append(path_hop) + else: + # different device type or device controller: chain connections + connection = connection_stack.get() + connections.append(connection) + connection_stack.queue[-1][3].append(connection[0]) + + connection_uuid = str(uuid.uuid4()) + prv_service_type = connection_stack.queue[-1][1] + service_type = get_service_type(res_class[1], prv_service_type) + connection_stack.put((connection_uuid, service_type, [path_hop], [])) + elif prv_res_class[0] < res_class[0]: # underlying connection ended connection = connection_stack.get() connections.append(connection) @@ -87,26 +109,27 @@ def convert_explicit_path_hops_to_connections( else: raise Exception('Uncontrolled condition') - old_device_layer = device_layer - last_device_uuid = device_uuid + prv_device_uuid = device_uuid + prv_res_class = res_class # path egress connections.append(connection_stack.get()) + LOGGER.debug('connections={:s}'.format(str(connections))) assert connection_stack.empty() return connections def convert_explicit_path_hops_to_plain_connection( - path_hops : List[Dict], main_connection_uuid : str -) -> List[Tuple[str, DeviceLayerEnum, List[str], List[str]]]: + path_hops : List[Dict], main_service_uuid : str, main_service_type : ServiceTypeEnum +) -> List[Tuple[str, int, List[str], List[str]]]: - connection : Tuple[str, DeviceLayerEnum, List[str], List[str]] = \ - (main_connection_uuid, DeviceLayerEnum.PACKET_DEVICE, [], []) + connection : Tuple[str, int, List[str], List[str]] = \ + (main_service_uuid, main_service_type, [], []) - last_device_uuid = None + prv_device_uuid = None for path_hop in path_hops: device_uuid = path_hop['device'] - if last_device_uuid == device_uuid: continue + if prv_device_uuid == device_uuid: continue connection[2].append(path_hop) - last_device_uuid = device_uuid + prv_device_uuid = device_uuid return [connection] diff --git a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py index cd1956a873dd2170c7a75db0c677db34162449ee..bd06e6ba19b3da9e2d38d5b83e1d7d3a806ff14f 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py @@ -13,8 +13,6 @@ # limitations under the License. from enum import IntEnum -from common.DeviceTypes import DeviceTypeEnum -from common.proto.context_pb2 import ServiceTypeEnum class CapacityUnit(IntEnum): TB = 0 @@ -66,50 +64,3 @@ class LinkForwardingDirection(IntEnum): BIDIRECTIONAL = 0 UNIDIRECTIONAL = 1 UNKNOWN = 2 - -class DeviceLayerEnum(IntEnum): - APPLICATION_CONTROLLER = 41 # Layer 4 domain controller - APPLICATION_DEVICE = 40 # Layer 4 domain device - PACKET_CONTROLLER = 31 # Layer 3 domain controller - PACKET_DEVICE = 30 # Layer 3 domain device - MAC_LAYER_CONTROLLER = 21 # Layer 2 domain controller - MAC_LAYER_DEVICE = 20 # Layer 2 domain device - OPTICAL_CONTROLLER = 1 # Layer 0 domain controller - OPTICAL_DEVICE = 0 # Layer 0 domain device - -DEVICE_TYPE_TO_LAYER = { - DeviceTypeEnum.EMULATED_DATACENTER.value : DeviceLayerEnum.APPLICATION_DEVICE, - DeviceTypeEnum.DATACENTER.value : DeviceLayerEnum.APPLICATION_DEVICE, - DeviceTypeEnum.NETWORK.value : DeviceLayerEnum.APPLICATION_DEVICE, - - DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : DeviceLayerEnum.PACKET_DEVICE, - DeviceTypeEnum.PACKET_ROUTER.value : DeviceLayerEnum.PACKET_DEVICE, - DeviceTypeEnum.EMULATED_PACKET_SWITCH.value : DeviceLayerEnum.MAC_LAYER_DEVICE, - DeviceTypeEnum.PACKET_SWITCH.value : DeviceLayerEnum.MAC_LAYER_DEVICE, - - DeviceTypeEnum.EMULATED_P4_SWITCH.value : DeviceLayerEnum.MAC_LAYER_DEVICE, - DeviceTypeEnum.P4_SWITCH.value : DeviceLayerEnum.MAC_LAYER_DEVICE, - - DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : DeviceLayerEnum.MAC_LAYER_CONTROLLER, - DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : DeviceLayerEnum.MAC_LAYER_CONTROLLER, - - DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value : DeviceLayerEnum.OPTICAL_CONTROLLER, - DeviceTypeEnum.OPEN_LINE_SYSTEM.value : DeviceLayerEnum.OPTICAL_CONTROLLER, - DeviceTypeEnum.XR_CONSTELLATION.value : DeviceLayerEnum.OPTICAL_CONTROLLER, - - DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value : DeviceLayerEnum.OPTICAL_DEVICE, - DeviceTypeEnum.OPTICAL_ROADM.value : DeviceLayerEnum.OPTICAL_DEVICE, - DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value : DeviceLayerEnum.OPTICAL_DEVICE, - DeviceTypeEnum.OPTICAL_TRANSPONDER.value : DeviceLayerEnum.OPTICAL_DEVICE, -} - -DEVICE_LAYER_TO_SERVICE_TYPE = { - DeviceLayerEnum.APPLICATION_DEVICE.value : ServiceTypeEnum.SERVICETYPE_L3NM, - DeviceLayerEnum.PACKET_DEVICE.value : ServiceTypeEnum.SERVICETYPE_L3NM, - - DeviceLayerEnum.MAC_LAYER_CONTROLLER.value : ServiceTypeEnum.SERVICETYPE_L2NM, - DeviceLayerEnum.MAC_LAYER_DEVICE.value : ServiceTypeEnum.SERVICETYPE_L2NM, - - DeviceLayerEnum.OPTICAL_CONTROLLER.value : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, - DeviceLayerEnum.OPTICAL_DEVICE.value : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, -} diff --git a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py index c8a902999ddfb5011fd7ec09fa99ff6fa697ea40..670757d76b7d21ecf28f6ead4e8bc4e21951d18e 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py +++ b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py @@ -43,13 +43,17 @@ # import logging -from typing import Dict, List +from typing import Dict, List, Tuple +from common.proto.context_pb2 import Link LOGGER = logging.getLogger(__name__) -def eropath_to_hops(ero_path : List[Dict], endpoint_to_link_dict : Dict) -> List[Dict]: +def eropath_to_hops( + ero_path : List[Dict], endpoint_to_link_dict : Dict[Tuple[str, str, str], Tuple[Dict, Link]] +) -> List[Dict]: try: path_hops = [] + num_ero_hops = len(ero_path) for endpoint in ero_path: device_uuid = endpoint['device_id'] endpoint_uuid = endpoint['endpoint_uuid'] @@ -59,23 +63,17 @@ def eropath_to_hops(ero_path : List[Dict], endpoint_to_link_dict : Dict) -> List continue last_hop = path_hops[-1] - if (last_hop['device'] == device_uuid): - if ('ingress_ep' not in last_hop) or ('egress_ep' in last_hop): continue - last_hop['egress_ep'] = endpoint_uuid - continue + if last_hop['device'] != device_uuid: raise Exception('Malformed path') + last_hop['egress_ep'] = endpoint_uuid + + if num_ero_hops - 1 == len(path_hops): break - endpoint_key = (last_hop['device'], last_hop['egress_ep']) - link_tuple = endpoint_to_link_dict.get(endpoint_key) - ingress = next(iter([ - ep_id for ep_id in link_tuple[0]['link_endpoint_ids'] - if (ep_id['endpoint_id']['device_id'] == device_uuid) and\ - (ep_id['endpoint_id']['endpoint_uuid'] != endpoint_uuid) - ]), None) - if ingress['endpoint_id']['device_id'] != device_uuid: raise Exception('Malformed path') + link_tuple = endpoint_to_link_dict[(device_uuid, endpoint_uuid, 'src')] + if link_tuple is None: raise Exception('Malformed path') + ingress = link_tuple[0]['link_endpoint_ids'][-1] path_hops.append({ 'device': ingress['endpoint_id']['device_id'], - 'ingress_ep': ingress['endpoint_id']['endpoint_uuid'], - 'egress_ep': endpoint_uuid, + 'ingress_ep': ingress['endpoint_id']['endpoint_uuid'] }) return path_hops except: diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py new file mode 100644 index 0000000000000000000000000000000000000000..53c89cd124cb7d3431b37a50596b0b793cfa83eb --- /dev/null +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -0,0 +1,94 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +from typing import Dict, Optional, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import Device +from common.tools.grpc.Tools import grpc_message_to_json_string + +DEVICE_TYPE_TO_DEEPNESS = { + DeviceTypeEnum.EMULATED_DATACENTER.value : 90, + DeviceTypeEnum.DATACENTER.value : 90, + DeviceTypeEnum.NETWORK.value : 90, + + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, + DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : 70, + DeviceTypeEnum.PACKET_ROUTER.value : 70, + + DeviceTypeEnum.EMULATED_PACKET_SWITCH.value : 60, + DeviceTypeEnum.PACKET_SWITCH.value : 60, + DeviceTypeEnum.EMULATED_P4_SWITCH.value : 60, + DeviceTypeEnum.P4_SWITCH.value : 60, + + DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : 40, + DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : 40, + + DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value : 40, + DeviceTypeEnum.XR_CONSTELLATION.value : 40, + + DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value : 30, + DeviceTypeEnum.OPEN_LINE_SYSTEM.value : 30, + + DeviceTypeEnum.EMULATED_PACKET_RADIO_ROUTER.value : 10, + DeviceTypeEnum.PACKET_RADIO_ROUTER.value : 10, + DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value : 10, + DeviceTypeEnum.OPTICAL_TRANSPONDER.value : 10, + DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value : 10, + DeviceTypeEnum.OPTICAL_ROADM.value : 10, + + DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER.value : 0, +} + +IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER} + +def get_device_controller_uuid( + device : Device +) -> Optional[str]: + for config_rule in device.device_config.config_rules: + if config_rule.WhichOneof('config_rule') != 'custom': continue + if config_rule.custom.resource_key != '_controller': continue + device_controller_id = json.loads(config_rule.custom.resource_value) + return device_controller_id['uuid'] + return None + +def _map_device_type(device : Device) -> DeviceTypeEnum: + device_type = DeviceTypeEnum._value2member_map_.get(device.device_type) # pylint: disable=no-member + if device_type is None: + MSG = 'Unsupported DeviceType({:s}) for Device({:s})' + raise Exception(MSG.format(str(device.device_type), grpc_message_to_json_string(device))) + return device_type + +def _map_resource_to_deepness(device_type : DeviceTypeEnum) -> int: + deepness = DEVICE_TYPE_TO_DEEPNESS.get(device_type.value) + if deepness is None: raise Exception('Unsupported DeviceType({:s})'.format(str(device_type.value))) + return deepness + +def get_device_type( + device : Device, device_dict : Dict[str, Tuple[Dict, Device]], device_controller_uuid : Optional[str] +) -> DeviceTypeEnum: + if device_controller_uuid is None: return _map_device_type(device) + device_controller_tuple = device_dict.get(device_controller_uuid) + if device_controller_tuple is None: raise Exception('Device({:s}) not found'.format(str(device_controller_uuid))) + _,device = device_controller_tuple + return _map_device_type(device) + +def get_resource_classification( + device : Device, device_dict : Dict[str, Tuple[Dict, Device]] +) -> Tuple[int, DeviceTypeEnum, Optional[str]]: + device_controller_uuid = get_device_controller_uuid(device) + device_type = get_device_type(device, device_dict, device_controller_uuid) + resource_deepness = _map_resource_to_deepness(device_type) + return resource_deepness, device_type, device_controller_uuid diff --git a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py new file mode 100644 index 0000000000000000000000000000000000000000..463b8039b6c8c611b579bdb74933c06fb0f99507 --- /dev/null +++ b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py @@ -0,0 +1,53 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ServiceTypeEnum + +PACKET_DEVICE_TYPES = { + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + DeviceTypeEnum.PACKET_ROUTER, DeviceTypeEnum.EMULATED_PACKET_ROUTER, + DeviceTypeEnum.PACKET_SWITCH, DeviceTypeEnum.EMULATED_PACKET_SWITCH, +} + +L2_DEVICE_TYPES = { + DeviceTypeEnum.PACKET_SWITCH, DeviceTypeEnum.EMULATED_PACKET_SWITCH, + DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM, DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM, + DeviceTypeEnum.PACKET_RADIO_ROUTER, DeviceTypeEnum.EMULATED_PACKET_RADIO_ROUTER, + DeviceTypeEnum.P4_SWITCH, DeviceTypeEnum.EMULATED_P4_SWITCH, +} + +OPTICAL_DEVICE_TYPES = { + DeviceTypeEnum.OPEN_LINE_SYSTEM, DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM, + DeviceTypeEnum.XR_CONSTELLATION, DeviceTypeEnum.EMULATED_XR_CONSTELLATION, + DeviceTypeEnum.OPTICAL_ROADM, DeviceTypeEnum.EMULATED_OPTICAL_ROADM, + DeviceTypeEnum.OPTICAL_TRANSPONDER, DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER, +} + +SERVICE_TYPE_L2NM = {ServiceTypeEnum.SERVICETYPE_L2NM} +SERVICE_TYPE_L3NM = {ServiceTypeEnum.SERVICETYPE_L3NM} +SERVICE_TYPE_LXNM = {ServiceTypeEnum.SERVICETYPE_L3NM, ServiceTypeEnum.SERVICETYPE_L2NM} +SERVICE_TYPE_TAPI = {ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE} + +def get_service_type(device_type : DeviceTypeEnum, prv_service_type : ServiceTypeEnum) -> ServiceTypeEnum: + if device_type in PACKET_DEVICE_TYPES and prv_service_type in SERVICE_TYPE_LXNM: return prv_service_type + if device_type in L2_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_L2NM + if device_type in OPTICAL_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE + + str_fields = ', '.join([ + 'device_type={:s}'.format(str(device_type)), + 'prv_service_type={:s}'.format(str(prv_service_type)), + ]) + raise Exception('Undefined Service Type for ({:s})'.format(str_fields)) diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__init__.py b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__main__.py b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba1cc4a2c1838248882b983c1ed25c27b395aa9a --- /dev/null +++ b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py @@ -0,0 +1,33 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import logging, sys +from common.proto.context_pb2 import ServiceTypeEnum +from pathcomp.frontend.service.algorithms.tools.ComputeSubServices import convert_explicit_path_hops_to_connections +from .data import path_hops, device_dict + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +def main(): + service_uuid = 'dc-2-dc-svc' + service_type = ServiceTypeEnum.SERVICETYPE_L2NM + connections = convert_explicit_path_hops_to_connections(path_hops, device_dict, service_uuid, service_type) + str_connections = '\n'.join([' ' + str(connection) for connection in connections]) + LOGGER.debug('connections = [\n{:s}\n]'.format(str_connections)) + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/pathcomp/frontend/tests/test_pathcomp/data.py b/src/pathcomp/frontend/tests/test_pathcomp/data.py new file mode 100644 index 0000000000000000000000000000000000000000..aeac5e38a222fb2dfc3f7ae98b2737b47f855ee4 --- /dev/null +++ b/src/pathcomp/frontend/tests/test_pathcomp/data.py @@ -0,0 +1,70 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +from typing import Dict, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ConfigActionEnum, Device + +path_hops = [ + {'device': 'DC1', 'ingress_ep': 'int', 'egress_ep': 'eth1' }, + {'device': 'PE1', 'ingress_ep': '1/1', 'egress_ep': '1/2' }, + {'device': 'MW1-2', 'ingress_ep': '172.18.0.1:1', 'egress_ep': '172.18.0.2:1' }, + {'device': 'HUB1', 'ingress_ep': '1/1', 'egress_ep': 'XR-T1' }, + {'device': 'splitter', 'ingress_ep': 'common', 'egress_ep': 'leaf1' }, + {'device': 'OLS', 'ingress_ep': 'node_1_port_13-input', 'egress_ep': 'node_4_port_13-output'}, + {'device': 'LEAF2', 'ingress_ep': 'XR-T1', 'egress_ep': '1/1' }, + {'device': 'PE4', 'ingress_ep': '1/1', 'egress_ep': '1/2' }, + {'device': 'DC2', 'ingress_ep': 'eth2', 'egress_ep': 'int' } +] + +device_data = { + 'TFS' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.TERAFLOWSDN_CONTROLLER }, + 'IPM' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.XR_CONSTELLATION }, + 'OLS' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.OPEN_LINE_SYSTEM }, + 'MW1-2' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM }, + 'MW3-4' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM }, + + 'DC1' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.EMULATED_DATACENTER }, + 'DC2' : {'controller_uuid': None, 'device_type': DeviceTypeEnum.EMULATED_DATACENTER }, + + 'PE1' : {'controller_uuid': 'TFS', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + 'PE2' : {'controller_uuid': 'TFS', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + 'PE3' : {'controller_uuid': 'TFS', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + 'PE4' : {'controller_uuid': 'TFS', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + + 'HUB1' : {'controller_uuid': 'IPM', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + 'LEAF1' : {'controller_uuid': 'IPM', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + 'LEAF2' : {'controller_uuid': 'IPM', 'device_type': DeviceTypeEnum.PACKET_ROUTER }, + + 'splitter': {'controller_uuid': None, 'device_type': DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER}, +} + +def process_device(device_uuid, json_device) -> Tuple[Dict, Device]: + grpc_device = Device() + grpc_device.device_id.device_uuid.uuid = device_uuid # pylint: disable=no-member + grpc_device.device_type = json_device['device_type'].value + controller_uuid = json_device.get('controller_uuid') + if controller_uuid is not None: + config_rule = grpc_device.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_controller' + config_rule.custom.resource_value = json.dumps({'uuid': controller_uuid}) + return json_device, grpc_device + +device_dict = { + device_uuid:process_device(device_uuid, json_device) + for device_uuid,json_device in device_data.items() +} 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 529ec633426e41f3218857642aa6751ac574ab23..967d1d6e604e312fe9d8314beea023f902af776b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java +++ b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java @@ -2245,6 +2245,8 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352; case XR: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; + case IETF_L2VPN: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN; case UNDEFINED: default: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED; @@ -2266,6 +2268,8 @@ public class Serializer { return DeviceDriverEnum.ONF_TR_352; case DEVICEDRIVER_XR: return DeviceDriverEnum.XR; + case DEVICEDRIVER_IETF_L2VPN: + return DeviceDriverEnum.IETF_L2VPN; case DEVICEDRIVER_UNDEFINED: case UNRECOGNIZED: default: 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 d284840b8dedb0320d49a5d5c6a1943c10d2afed..64102646119585e1f837b12a9be022d95a29c54f 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java +++ b/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java @@ -3600,6 +3600,8 @@ class SerializerTest { DeviceDriverEnum.ONF_TR_352, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352), Arguments.of(DeviceDriverEnum.XR, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR), + Arguments.of( + DeviceDriverEnum.IETF_L2VPN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN), Arguments.of( DeviceDriverEnum.UNDEFINED, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)); } diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index fbbba62a2baa1c2fe2b3c3fe090883d6542996e4..53252341b30dc093c79d5a54baf98b82e6a24b75 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -177,6 +177,10 @@ public final class ContextOuterClass { * DEVICEDRIVER_XR = 6; */ DEVICEDRIVER_XR(6), + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + DEVICEDRIVER_IETF_L2VPN(7), UNRECOGNIZED(-1), ; @@ -212,6 +216,10 @@ public final class ContextOuterClass { * DEVICEDRIVER_XR = 6; */ public static final int DEVICEDRIVER_XR_VALUE = 6; + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; public final int getNumber() { @@ -245,6 +253,7 @@ public final class ContextOuterClass { case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; case 5: return DEVICEDRIVER_ONF_TR_352; case 6: return DEVICEDRIVER_XR; + case 7: return DEVICEDRIVER_IETF_L2VPN; default: return null; } } diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index a73ec53f37d68e0414eeb1df146373c6906273c5..3ec71dc64536e28457c4f1adbf3679186285786d 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -33,7 +33,8 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_P4, DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352, - DeviceDriverEnum.DEVICEDRIVER_XR + DeviceDriverEnum.DEVICEDRIVER_XR, + DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN, } # Map allowed filter fields to allowed values per Filter field. If no restriction (free text) None is specified diff --git a/src/service/service/service_handler_api/ServiceHandlerFactory.py b/src/service/service/service_handler_api/ServiceHandlerFactory.py index 6aa21b49920254383fad5f28aa234b6ec0cad5a3..64ea204a2600a71b08c8c373a15640f5e2134787 100644 --- a/src/service/service/service_handler_api/ServiceHandlerFactory.py +++ b/src/service/service/service_handler_api/ServiceHandlerFactory.py @@ -73,6 +73,9 @@ class ServiceHandlerFactory: if field_indice is None: continue if not isinstance(field_values, Iterable) or isinstance(field_values, str): field_values = [field_values] + if len(field_values) == 0: + # do not allow empty fields; might cause wrong selection + raise UnsatisfiedFilterException(filter_fields) field_enum_values = FILTER_FIELD_ALLOWED_VALUES.get(field_name) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 4c9059779d6b7031685e1de76b0a7ed651af6c5f..257bc138fe932e7e5abee00981848248039d0b3f 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -15,12 +15,14 @@ from common.proto.context_pb2 import DeviceDriverEnum, ServiceTypeEnum from ..service_handler_api.FilterFields import FilterFieldEnum from .l2nm_emulated.L2NMEmulatedServiceHandler import L2NMEmulatedServiceHandler +from .l2nm_ietfl2vpn.L2NM_IETFL2VPN_ServiceHandler import L2NM_IETFL2VPN_ServiceHandler from .l2nm_openconfig.L2NMOpenConfigServiceHandler import L2NMOpenConfigServiceHandler from .l3nm_emulated.L3NMEmulatedServiceHandler import L3NMEmulatedServiceHandler from .l3nm_openconfig.L3NMOpenConfigServiceHandler import L3NMOpenConfigServiceHandler +from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4.p4_service_handler import P4ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler -from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler +from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler SERVICE_HANDLERS = [ (L2NMEmulatedServiceHandler, [ @@ -50,13 +52,19 @@ SERVICE_HANDLERS = [ (TapiServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, - FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API, DeviceDriverEnum.DEVICEDRIVER_XR], + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API], + } + ]), + (TapiXrServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_XR], } ]), (MicrowaveServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, - FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352], } ]), (P4ServiceHandler, [ @@ -65,4 +73,10 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), + (L2NM_IETFL2VPN_ServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN], + } + ]), ] diff --git a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py index c2ea6e213ee8d18b4507089fb2762c913e03039a..363983b8653e1cfa553279d2df74d6ac893a4fec 100644 --- a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py @@ -21,15 +21,18 @@ def setup_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + if service_settings is None: return [] + if endpoint_settings is None: return [] - mtu = json_settings.get('mtu', 1450 ) # 1512 + #json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value + + #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 #bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 - router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 @@ -43,17 +46,17 @@ def setup_config_rules( connection_point_id = 'VC-1' json_config_rules = [ - json_config_rule_set( - '/network_instance[default]', - {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), + #json_config_rule_set( + # '/network_instance[default]', + # {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), - json_config_rule_set( - '/network_instance[default]/protocols[OSPF]', - {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), + #json_config_rule_set( + # '/network_instance[default]/protocols[OSPF]', + # {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), - json_config_rule_set( - '/network_instance[default]/protocols[STATIC]', - {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), + #json_config_rule_set( + # '/network_instance[default]/protocols[STATIC]', + # {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), json_config_rule_set( '/network_instance[{:s}]'.format(network_instance_name), @@ -66,7 +69,7 @@ def setup_config_rules( json_config_rule_set( '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, - 'subinterface': sub_interface_index}), + 'subinterface': sub_interface_index}), json_config_rule_set( '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), @@ -80,15 +83,18 @@ def teardown_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - #json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + if service_settings is None: return [] + if endpoint_settings is None: return [] + + #json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 #bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 - router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 #vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 @@ -99,36 +105,36 @@ def teardown_config_rules( if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) - connection_point_id = 'VC-1' + #connection_point_id = 'VC-1' json_config_rules = [ - json_config_rule_delete( - '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), - {'name': network_instance_name, 'connection_point': connection_point_id}), + #json_config_rule_delete( + # '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), + # {'name': network_instance_name, 'connection_point': connection_point_id}), - json_config_rule_delete( - '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), - {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, - 'subinterface': sub_interface_index}), - - json_config_rule_delete( - '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), - {'name': if_cirid_name, 'index': sub_interface_index}), + #json_config_rule_delete( + # '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), + # {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, + # 'subinterface': sub_interface_index}), json_config_rule_delete( '/network_instance[{:s}]'.format(network_instance_name), {'name': network_instance_name}), json_config_rule_delete( - '/network_instance[default]/protocols[STATIC]', - {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), + '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), + {'name': if_cirid_name, 'index': sub_interface_index}), - json_config_rule_delete( - '/network_instance[default]/protocols[OSPF]', - {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), + #json_config_rule_delete( + # '/network_instance[default]/protocols[STATIC]', + # {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), - json_config_rule_delete( - '/network_instance[default]', - {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), + #json_config_rule_delete( + # '/network_instance[default]/protocols[OSPF]', + # {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), + + #json_config_rule_delete( + # '/network_instance[default]', + # {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), ] return json_config_rules diff --git a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py index 9de6c607b1336a4b3fb43867efc16d30048177e0..0a2261ceb4e1a63c984cf833121e3a87e13c0e9f 100644 --- a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py @@ -75,10 +75,12 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - del device_obj.device_config.config_rules[:] - for json_config_rule in json_config_rules: - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + if len(json_config_rules) > 0: + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to SetEndpoint({:s})'.format(str(endpoint))) @@ -110,10 +112,12 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - del device_obj.device_config.config_rules[:] - for json_config_rule in json_config_rules: - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + if len(json_config_rules) > 0: + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..880a6c5a20d618c9d9f21701b7ef3886dbb9fc21 --- /dev/null +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py @@ -0,0 +1,173 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +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.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 +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'tapi_tapi'}) + +class L2NM_IETFL2VPN_ServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + json_settings : Dict = {} if settings is None else settings.value + encap_type = json_settings.get('encapsulation_type', '') + vlan_id = json_settings.get('vlan_id', 100) + + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_endpoint = get_endpoint_matching(src_device, src_endpoint_uuid) + src_controller = self.__task_executor.get_device_controller(src_device) + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_endpoint = get_endpoint_matching(dst_device, dst_endpoint_uuid) + dst_controller = self.__task_executor.get_device_controller(dst_device) + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { + 'uuid' : service_uuid, + 'src_device_name' : src_device.name, + 'src_endpoint_name' : src_endpoint.name, + 'dst_device_name' : dst_device.name, + 'dst_endpoint_name' : dst_endpoint.name, + 'encapsulation_type': encap_type, + 'vlan_id' : vlan_id, + }) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + + results = [] + try: + src_device_uuid, _ = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + + dst_device_uuid, _ = get_device_endpoint_uuids(endpoints[1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { + 'uuid': service_uuid + }) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py index 07e78d73631342d101d77697098e83961c7dcf26..63e818a8303f9939abe8f776cd34b3066cb84ec1 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py @@ -20,16 +20,13 @@ def setup_config_rules( service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - + if service_settings is None: return [] if endpoint_settings is None: return [] - json_settings : Dict = service_settings.value + #json_settings : Dict = service_settings.value json_endpoint_settings : Dict = endpoint_settings.value - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value - #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 @@ -41,43 +38,32 @@ def setup_config_rules( vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 - remote_router = json_endpoint_settings.get('remote_router', '5.5.5.5') # '5.5.5.5' - circuit_id = json_endpoint_settings.get('circuit_id', '111' ) # '111' - + remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5' + circuit_id = json_endpoint_settings.get('circuit_id', '000' ) # '111' if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) connection_point_id = 'VC-1' json_config_rules = [ - + json_config_rule_set( '/network_instance[{:s}]'.format(network_instance_name), - {'name': network_instance_name, - 'type': 'L2VSI'}), + {'name': network_instance_name, 'type': 'L2VSI'}), json_config_rule_set( - '/interface[{:s}]/subinterface[0]'.format(if_cirid_name), - {'name': if_cirid_name, - 'type': 'l2vlan', - 'index': sub_interface_index, - 'vlan_id': vlan_id}), + '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), + {'name': if_cirid_name, 'type': 'l2vlan', 'index': sub_interface_index, 'vlan_id': vlan_id}), json_config_rule_set( '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), - {'name': network_instance_name, - 'id': if_cirid_name, - 'interface': if_cirid_name, - 'subinterface': 0 - }), + {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, + 'subinterface': sub_interface_index}), json_config_rule_set( '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), - {'name': network_instance_name, - 'connection_point': connection_point_id, - 'VC_ID': circuit_id, - 'remote_system': remote_router - }), + {'name': network_instance_name, 'connection_point': connection_point_id, 'VC_ID': circuit_id, + 'remote_system': remote_router}), ] return json_config_rules @@ -86,8 +72,11 @@ def teardown_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - #json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + if service_settings is None: return [] + if endpoint_settings is None: return [] + + #json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] @@ -96,7 +85,7 @@ def teardown_config_rules( #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' - #sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 #vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 @@ -105,17 +94,26 @@ def teardown_config_rules( if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) - #connection_point_id = 'VC-1' + connection_point_id = 'VC-1' json_config_rules = [ + + json_config_rule_delete( + '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), + {'name': network_instance_name, 'connection_point': connection_point_id, 'VC_ID': circuit_id}), + + json_config_rule_delete( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), + {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, + 'subinterface': sub_interface_index}), + + json_config_rule_delete( + '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), + {'name': if_cirid_name, 'index': sub_interface_index}), + json_config_rule_delete( '/network_instance[{:s}]'.format(network_instance_name), {'name': network_instance_name}), - - json_config_rule_delete( - '/interface[{:s}]/subinterface[0]'.format(if_cirid_name),{ - 'name': if_cirid_name, - }), - + ] return json_config_rules diff --git a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py index 903ad8cd5ae442a03d54fb49083f3837a3c8187c..f4a46112e778bd01aa76322384d8adee942aaa5b 100644 --- a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py @@ -21,8 +21,11 @@ def setup_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + if service_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value service_short_uuid = service_uuid.split('-')[-1] network_instance_name = '{:s}-NetInst'.format(service_short_uuid) @@ -142,8 +145,11 @@ def teardown_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + if service_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] diff --git a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py index 47de9c94fbb8a5ddac848336c2ed7936d0126b45..18da03b08c0ea490b60c41df3894392022ddf228 100644 --- a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py @@ -75,10 +75,12 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - del device_obj.device_config.config_rules[:] - for json_config_rule in json_config_rules: - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + if len(json_config_rules) > 0: + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to SetEndpoint({:s})'.format(str(endpoint))) @@ -110,10 +112,12 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - del device_obj.device_config.config_rules[:] - for json_config_rule in json_config_rules: - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + if len(json_config_rules) > 0: + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index ef93dcdda8145cab15ff21c24b6318e9eb00e098..5d260bf86b82c66be8eb2f0caa683a72d8bd0ba5 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -187,8 +187,8 @@ def teardown_config_rules( if service_settings is None: return [] if endpoint_settings is None: return [] - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value service_short_uuid = service_uuid.split('-')[-1] network_instance_name = '{:s}-NetInst'.format(service_short_uuid) diff --git a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py index ee64d2fa4ff0110aea9ee4beee97fa83915ab57d..40c87eeee2c8dd1ddd5a39162f8ff7f117344e3b 100644 --- a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py +++ b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py @@ -61,7 +61,7 @@ class MicrowaveServiceHandler(_ServiceHandler): device_uuid_dst, endpoint_uuid_dst = get_device_endpoint_uuids(endpoints[1]) if device_uuid_src != device_uuid_dst: - raise Exception('Diferent Src-Dst devices not supported by now') + raise Exception('Different Src-Dst devices not supported by now') device_uuid = device_uuid_src device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) @@ -106,7 +106,7 @@ class MicrowaveServiceHandler(_ServiceHandler): device_uuid_dst, _ = get_device_endpoint_uuids(endpoints[1]) if device_uuid_src != device_uuid_dst: - raise Exception('Diferent Src-Dst devices not supported by now') + raise Exception('Different Src-Dst devices not supported by now') device_uuid = device_uuid_src device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) diff --git a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py index 8abd12b2a24c49a6c5e50cebe7a2d65dc7ce4eb1..af7d4bc949fc98f057ade66b58d8b9b38e0707ed 100644 --- a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py +++ b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py @@ -19,7 +19,7 @@ from common.proto.context_pb2 import ConfigRule, DeviceId, Service 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 -from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api.Tools import get_device_endpoint_uuids from service.service.service_handler_api._ServiceHandler import _ServiceHandler from service.service.service_handler_api.SettingsHandler import SettingsHandler from service.service.task_scheduler.TaskExecutor import TaskExecutor @@ -42,7 +42,7 @@ class TapiServiceHandler(_ServiceHandler): ) -> List[Union[bool, Exception]]: chk_type('endpoints', endpoints, list) - if len(endpoints) != 2: return [] + if len(endpoints) < 2: return [] service_uuid = self.__service.service_id.service_uuid.uuid settings = self.__settings_handler.get('/settings') @@ -55,30 +55,33 @@ class TapiServiceHandler(_ServiceHandler): results = [] try: - device_uuid_src, endpoint_uuid_src = get_device_endpoint_uuids(endpoints[0]) - device_uuid_dst, endpoint_uuid_dst = get_device_endpoint_uuids(endpoints[1]) + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device - if device_uuid_src != device_uuid_dst: - raise Exception('Diferent Src-Dst devices not supported by now') - device_uuid = device_uuid_src + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device - device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) - endpoint_name_src = get_endpoint_matching(device_obj, endpoint_uuid_src).name - endpoint_name_dst = get_endpoint_matching(device_obj, endpoint_uuid_dst).name + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { 'uuid' : service_uuid, - 'input_sip' : endpoint_name_src, - 'output_sip' : endpoint_name_dst, + 'input_sip_uuid' : src_endpoint_uuid, + 'output_sip_uuid' : dst_endpoint_uuid, 'capacity_unit' : capacity_unit, 'capacity_value' : capacity_value, 'layer_protocol_name' : layer_proto_name, 'layer_protocol_qualifier': layer_proto_qual, 'direction' : direction, }) - del device_obj.device_config.config_rules[:] - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) @@ -92,27 +95,32 @@ class TapiServiceHandler(_ServiceHandler): ) -> List[Union[bool, Exception]]: chk_type('endpoints', endpoints, list) - if len(endpoints) != 2: return [] + if len(endpoints) < 2: return [] service_uuid = self.__service.service_id.service_uuid.uuid results = [] try: - device_uuid_src, _ = get_device_endpoint_uuids(endpoints[0]) - device_uuid_dst, _ = get_device_endpoint_uuids(endpoints[1]) + src_device_uuid, _ = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device - if device_uuid_src != device_uuid_dst: - raise Exception('Diferent Src-Dst devices not supported by now') - device_uuid = device_uuid_src + dst_device_uuid, _ = get_device_endpoint_uuids(endpoints[1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device - device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { 'uuid': service_uuid }) - del device_obj.device_config.config_rules[:] - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) diff --git a/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..a1e1b8a6fff9436d6cdff13b95b0ecd43f6fa661 --- /dev/null +++ b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py @@ -0,0 +1,176 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +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.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 +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'tapi_xr'}) + +class TapiXrServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) != 4: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + json_settings : Dict = {} if settings is None else settings.value + capacity_value = json_settings.get('capacity_value', 50.0) + capacity_unit = json_settings.get('capacity_unit', 'GHz') + + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[1]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_endpoint = get_endpoint_matching(src_device, src_endpoint_uuid) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[2]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_endpoint = get_endpoint_matching(dst_device, dst_endpoint_uuid) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { + 'uuid' : service_uuid, + 'input_sip_name' : '|'.join([src_device.name, src_endpoint.name]), + 'output_sip_name': '|'.join([dst_device.name, dst_endpoint.name]), + 'capacity_unit' : capacity_unit, + 'capacity_value' : capacity_value, + }) + + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + + results = [] + try: + src_device_uuid, _ = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device + + dst_device_uuid, _ = get_device_endpoint_uuids(endpoints[1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { + 'uuid': service_uuid + }) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/tapi_xr/__init__.py b/src/service/service/service_handlers/tapi_xr/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/service/service/service_handlers/tapi_xr/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 932c56e2b1934e12e7849a60c22d3ca1be7f8093..3d157e3145d4b195c0251a4ab79f710a38726569 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -12,10 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Optional, Union from common.method_wrappers.ServiceExceptions import NotFoundException from common.proto.context_pb2 import Connection, ConnectionId, Device, DeviceId, Service, ServiceId +from common.tools.object_factory.Device import json_device_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.service.service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory, get_service_handler_class @@ -103,13 +105,38 @@ class TaskExecutor: self._device_client.ConfigureDevice(device) self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) - def get_devices_from_connection(self, connection : Connection) -> Dict[str, Device]: + def get_device_controller(self, device : Device) -> Optional[Device]: + json_controller = None + for config_rule in device.device_config.config_rules: + if config_rule.WhichOneof('config_rule') != 'custom': continue + if config_rule.custom.resource_key != '_controller': continue + json_controller = json.loads(config_rule.custom.resource_value) + break + + if json_controller is None: return None + + controller_uuid = json_controller['uuid'] + controller = self.get_device(DeviceId(**json_device_id(controller_uuid))) + controller_uuid = controller.device_id.device_uuid.uuid + if controller is None: raise Exception('Device({:s}) not found'.format(str(controller_uuid))) + return controller + + def get_devices_from_connection( + self, connection : Connection, exclude_managed_by_controller : bool = False + ) -> Dict[str, Device]: devices = dict() for endpoint_id in connection.path_hops_endpoint_ids: device = self.get_device(endpoint_id.device_id) device_uuid = endpoint_id.device_id.device_uuid.uuid if device is None: raise Exception('Device({:s}) not found'.format(str(device_uuid))) - devices[device_uuid] = device + + controller = self.get_device_controller(device) + if controller is None: + devices[device_uuid] = device + else: + if not exclude_managed_by_controller: + devices[device_uuid] = device + devices[controller.device_id.device_uuid.uuid] = controller return devices # ----- Service-related methods ------------------------------------------------------------------------------------ @@ -139,6 +166,6 @@ class TaskExecutor: def get_service_handler( self, connection : Connection, service : Service, **service_handler_settings ) -> '_ServiceHandler': - connection_devices = self.get_devices_from_connection(connection) + connection_devices = self.get_devices_from_connection(connection, exclude_managed_by_controller=True) service_handler_class = get_service_handler_class(self._service_handler_factory, service, connection_devices) return service_handler_class(service, self, **service_handler_settings) diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py index 5a47005b304836050dd8c0882214dd9cebd5d8b5..4367ffdee4d6d5b9edfc9fd30d0d6b6f48da8a75 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py @@ -32,7 +32,7 @@ class Task_ConnectionConfigure(_Task): def connection_id(self) -> ConnectionId: return self._connection_id @staticmethod - def build_key(connection_id : ConnectionId) -> str: + def build_key(connection_id : ConnectionId) -> str: # pylint: disable=arguments-differ str_connection_id = get_connection_key(connection_id) return KEY_TEMPLATE.format(connection_id=str_connection_id) diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py index 5736054febd2fb9e8a36b5a2235ca3f412e0e174..70f41566ef5e69605a527cc0392b77acb866ec2c 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py @@ -32,7 +32,7 @@ class Task_ConnectionDeconfigure(_Task): def connection_id(self) -> ConnectionId: return self._connection_id @staticmethod - def build_key(connection_id : ConnectionId) -> str: + def build_key(connection_id : ConnectionId) -> str: # pylint: disable=arguments-differ str_connection_id = get_connection_key(connection_id) return KEY_TEMPLATE.format(connection_id=str_connection_id) diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py index 6a4e11b540cd9b85028d92cf86899ee098056c36..0f021b6ca65da1c6b5e44d8577bf9dd6875eb17a 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py @@ -28,7 +28,7 @@ class Task_ServiceDelete(_Task): def service_id(self) -> ServiceId: return self._service_id @staticmethod - def build_key(service_id : ServiceId) -> str: + def build_key(service_id : ServiceId) -> str: # pylint: disable=arguments-differ str_service_id = get_service_key(service_id) return KEY_TEMPLATE.format(service_id=str_service_id) diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py index 815cb33c3d540755704153b661e889fc2660d268..d5360fe85eae68085298406fc0ed19dd105f187e 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py @@ -32,7 +32,7 @@ class Task_ServiceSetStatus(_Task): def new_status(self) -> ServiceStatusEnum: return self._new_status @staticmethod - def build_key(service_id : ServiceId, new_status : ServiceStatusEnum) -> str: + def build_key(service_id : ServiceId, new_status : ServiceStatusEnum) -> str: # pylint: disable=arguments-differ str_service_id = get_service_key(service_id) str_new_status = ServiceStatusEnum.Name(new_status) return KEY_TEMPLATE.format(service_id=str_service_id, new_status=str_new_status) diff --git a/src/slice/service/slice_grouper/SliceGrouper.py b/src/slice/service/slice_grouper/SliceGrouper.py index 735d028993eb11e83138caebde1e32ebc830093f..2f1a791819f6a8d0951e9e93ca22d071ea66c1f7 100644 --- a/src/slice/service/slice_grouper/SliceGrouper.py +++ b/src/slice/service/slice_grouper/SliceGrouper.py @@ -29,6 +29,7 @@ class SliceGrouper: def __init__(self) -> None: self._lock = threading.Lock() self._is_enabled = is_slice_grouping_enabled() + LOGGER.info('Slice Grouping: {:s}'.format('ENABLED' if self._is_enabled else 'DISABLED')) if not self._is_enabled: return metrics_exporter = MetricsExporter() diff --git a/src/tests/ofc23/.gitignore b/src/tests/ofc23/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0a3f4400d5c88b1af32c7667d69d2fdc12d5424e --- /dev/null +++ b/src/tests/ofc23/.gitignore @@ -0,0 +1,2 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. +descriptors_real.json diff --git a/src/tests/ofc23/MultiIngressController.txt b/src/tests/ofc23/MultiIngressController.txt new file mode 100644 index 0000000000000000000000000000000000000000..190e6df7425983db43d8b1888f29861ec9056ed6 --- /dev/null +++ b/src/tests/ofc23/MultiIngressController.txt @@ -0,0 +1,23 @@ +# Ref: https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/ +# Ref: https://fabianlee.org/2021/07/29/kubernetes-microk8s-with-multiple-metallb-endpoints-and-nginx-ingress-controllers/ + +# Check node limits +kubectl describe nodes + +# Create secondary ingress controllers +kubectl apply -f ofc23/nginx-ingress-controller-parent.yaml +kubectl apply -f ofc23/nginx-ingress-controller-child.yaml + +# Delete secondary ingress controllers +kubectl delete -f ofc23/nginx-ingress-controller-parent.yaml +kubectl delete -f ofc23/nginx-ingress-controller-child.yaml + +source ofc23/deploy_specs_parent.sh +./deploy/all.sh + +source ofc23/deploy_specs_child.sh +./deploy/all.sh + +# Manually deploy ingresses for instances +kubectl --namespace tfs-parent apply -f ofc23/tfs-ingress-parent.yaml +kubectl --namespace tfs-child apply -f ofc23/tfs-ingress-child.yaml diff --git a/src/tests/ofc23/__init__.py b/src/tests/ofc23/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/tests/ofc23/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/ofc23/delete_hierar.sh b/src/tests/ofc23/delete_hierar.sh new file mode 100755 index 0000000000000000000000000000000000000000..4a03dad1cc29cff72347f68bc7b1a082924a9211 --- /dev/null +++ b/src/tests/ofc23/delete_hierar.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs-parent tfs-child + +# Delete secondary ingress controllers +kubectl delete -f ofc23/nginx-ingress-controller-parent.yaml +kubectl delete -f ofc23/nginx-ingress-controller-child.yaml diff --git a/src/tests/ofc23/delete_sligrp.sh b/src/tests/ofc23/delete_sligrp.sh new file mode 100755 index 0000000000000000000000000000000000000000..cce0bd53febc4765f9d455619f49ea4de8dfe870 --- /dev/null +++ b/src/tests/ofc23/delete_sligrp.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs diff --git a/src/tests/ofc23/deploy_child.sh b/src/tests/ofc23/deploy_child.sh new file mode 100755 index 0000000000000000000000000000000000000000..9b05ed88739114bf9029d8afaf491d7fec726bff --- /dev/null +++ b/src/tests/ofc23/deploy_child.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs-child + +# Delete secondary ingress controllers +kubectl delete -f ofc23/nginx-ingress-controller-child.yaml + +# Create secondary ingress controllers +kubectl apply -f ofc23/nginx-ingress-controller-child.yaml + +# Deploy TFS for Child +source ofc23/deploy_specs_child.sh +./deploy/all.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_child.sh diff --git a/src/tests/ofc23/deploy_hierar.sh b/src/tests/ofc23/deploy_hierar.sh new file mode 100755 index 0000000000000000000000000000000000000000..4874688ad7561156b1b5fc4c80b72a9745feb6a0 --- /dev/null +++ b/src/tests/ofc23/deploy_hierar.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs-parent tfs-child + +# Delete secondary ingress controllers +kubectl delete -f ofc23/nginx-ingress-controller-parent.yaml +kubectl delete -f ofc23/nginx-ingress-controller-child.yaml + +# Create secondary ingress controllers +kubectl apply -f ofc23/nginx-ingress-controller-parent.yaml +kubectl apply -f ofc23/nginx-ingress-controller-child.yaml + +# Deploy TFS for Parent +source ofc23/deploy_specs_parent.sh +./deploy/all.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_parent.sh + +# Deploy TFS for Child +source ofc23/deploy_specs_child.sh +./deploy/all.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_child.sh diff --git a/src/tests/ofc23/deploy_parent.sh b/src/tests/ofc23/deploy_parent.sh new file mode 100755 index 0000000000000000000000000000000000000000..ac4a2954213cf577efe1b1a8e499635d80ea3548 --- /dev/null +++ b/src/tests/ofc23/deploy_parent.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs-parent + +# Delete secondary ingress controllers +kubectl delete -f ofc23/nginx-ingress-controller-parent.yaml + +# Create secondary ingress controllers +kubectl apply -f ofc23/nginx-ingress-controller-parent.yaml + +# Deploy TFS for Parent +source ofc23/deploy_specs_parent.sh +./deploy/all.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_parent.sh diff --git a/src/tests/ofc23/deploy_sligrp.sh b/src/tests/ofc23/deploy_sligrp.sh new file mode 100755 index 0000000000000000000000000000000000000000..62a9df5cf006af856f168add4058d63eaa905784 --- /dev/null +++ b/src/tests/ofc23/deploy_sligrp.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Delete old namespaces +kubectl delete namespace tfs-sligrp + +# Deploy TFS for Slice Goruping +source ofc23/deploy_specs_sligrp.sh +./deploy/all.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_sligrp.sh diff --git a/src/tests/ofc23/deploy_specs_child.sh b/src/tests/ofc23/deploy_specs_child.sh new file mode 100755 index 0000000000000000000000000000000000000000..4d2b3502294925d82f675263fd6bddea62ec181a --- /dev/null +++ b/src/tests/ofc23/deploy_specs_child.sh @@ -0,0 +1,118 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#automation monitoring load_generator +export TFS_COMPONENTS="context device pathcomp service slice compute webui" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs-child" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="ofc23/tfs-ingress-child.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="YES" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set the database name to be used by Context. +export CRDB_DATABASE="tfs_child" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats-child" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4224" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8224" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb-child" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8814" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9012" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9002" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" diff --git a/src/tests/ofc23/deploy_specs_parent.sh b/src/tests/ofc23/deploy_specs_parent.sh new file mode 100755 index 0000000000000000000000000000000000000000..808f4e28734be71e6eb7fb2aced39211fd8e7f24 --- /dev/null +++ b/src/tests/ofc23/deploy_specs_parent.sh @@ -0,0 +1,118 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#automation monitoring load_generator +export TFS_COMPONENTS="context device pathcomp service slice compute webui" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs-parent" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="ofc23/tfs-ingress-parent.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set the database name to be used by Context. +export CRDB_DATABASE="tfs_parent" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats-parent" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4223" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8223" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb-parent" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8813" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9011" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9001" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" diff --git a/src/tests/ofc23/deploy_specs_sligrp.sh b/src/tests/ofc23/deploy_specs_sligrp.sh new file mode 100755 index 0000000000000000000000000000000000000000..90bea4567bd35d845abf943670f8aa33070dff57 --- /dev/null +++ b/src/tests/ofc23/deploy_specs_sligrp.sh @@ -0,0 +1,118 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#automation monitoring load_generator +export TFS_COMPONENTS="context device pathcomp service slice webui load_generator" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs-sligrp" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set the database name to be used by Context. +export CRDB_DATABASE="tfs_sligrp" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats-sligrp" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb-sligrp" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9010" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" diff --git a/src/tests/ofc23/descriptors/adva-interfaces.txt b/src/tests/ofc23/descriptors/adva-interfaces.txt new file mode 100644 index 0000000000000000000000000000000000000000..a634735058aa9490ddbd43e8e9a0752fbd4a6ee6 --- /dev/null +++ b/src/tests/ofc23/descriptors/adva-interfaces.txt @@ -0,0 +1,89 @@ +R199 +eth-1/0/1 +eth-1/0/10 +eth-1/0/11 +eth-1/0/12 +eth-1/0/13 +eth-1/0/14 +eth-1/0/15 +eth-1/0/16 +eth-1/0/17 +eth-1/0/18 +eth-1/0/19 +eth-1/0/2 +eth-1/0/20 +eth-1/0/21 +eth-1/0/22 +eth-1/0/23 +eth-1/0/24 +eth-1/0/25 +eth-1/0/26 +eth-1/0/27 +eth-1/0/28 +eth-1/0/29 +eth-1/0/3 +eth-1/0/30 +eth-1/0/4 +eth-1/0/5 +eth-1/0/6 +eth-1/0/7 +eth-1/0/8 +eth-1/0/9 + +R155 +eth-1/0/1 +eth-1/0/10 +eth-1/0/11 +eth-1/0/12 +eth-1/0/13 +eth-1/0/14 +eth-1/0/15 +eth-1/0/16 +eth-1/0/17 +eth-1/0/18 +eth-1/0/19 +eth-1/0/2 +eth-1/0/20 +eth-1/0/21 +eth-1/0/22 +eth-1/0/23 +eth-1/0/24 +eth-1/0/25 +eth-1/0/26 +eth-1/0/27 +eth-1/0/3 +eth-1/0/4 +eth-1/0/5 +eth-1/0/6 +eth-1/0/7 +eth-1/0/8 +eth-1/0/9 + +R149 +eth-1/0/1 +eth-1/0/10 +eth-1/0/11 +eth-1/0/12 +eth-1/0/13 +eth-1/0/14 +eth-1/0/15 +eth-1/0/16 +eth-1/0/17 +eth-1/0/18 +eth-1/0/19 +eth-1/0/2 +eth-1/0/20 +eth-1/0/21 +eth-1/0/22 +eth-1/0/23 +eth-1/0/24 +eth-1/0/25 +eth-1/0/26 +eth-1/0/27 +eth-1/0/3 +eth-1/0/4 +eth-1/0/5 +eth-1/0/6 +eth-1/0/7 +eth-1/0/8 +eth-1/0/9 diff --git a/src/tests/ofc23/descriptors/backup/dc-2-dc-service.json b/src/tests/ofc23/descriptors/backup/dc-2-dc-service.json new file mode 100644 index 0000000000000000000000000000000000000000..3a83afa6de81f137204aecc5f0eca476aad71e61 --- /dev/null +++ b/src/tests/ofc23/descriptors/backup/dc-2-dc-service.json @@ -0,0 +1,37 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-svc"} + }, + "service_type": 2, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}}, + {"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}} + ], + "service_constraints": [ + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 15.2}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { + "address_families": ["IPV4"], "bgp_as": 65000, "bgp_route_target": "65000:123", + "mtu": 1512, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R149]/endpoint[eth-1/0/22]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.5", + "address_ip": "172.16.4.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R155]/endpoint[eth-1/0/22]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.1", + "address_ip": "172.16.2.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R199]/endpoint[eth-1/0/21]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.6", + "address_ip": "172.16.1.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}} + ]} + } + ] +} diff --git a/src/tests/ofc23/descriptors/backup/descriptor_child.json b/src/tests/ofc23/descriptors/backup/descriptor_child.json new file mode 100644 index 0000000000000000000000000000000000000000..eea9571531cfbebfcc53dba0679d1bd1b6900b2f --- /dev/null +++ b/src/tests/ofc23/descriptors/backup/descriptor_child.json @@ -0,0 +1,183 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R199"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.199"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 120}, + "endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/4"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/5"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/6"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/7"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/8"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/9"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/10"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/11"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/12"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/13"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/14"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/15"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/16"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/17"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/18"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/19"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/20"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/21"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/22"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/23"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/24"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/25"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/26"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/27"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/28"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/29"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/30"} + ] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R155"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.155"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 120}, + "endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/4"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/5"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/6"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/7"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/8"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/9"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/10"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/11"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/12"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/13"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/14"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/15"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/16"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/17"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/18"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/19"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/20"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/21"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/22"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/23"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/24"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/25"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/26"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/27"} + ] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R149"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.149"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 120}, + "endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/4"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/5"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/6"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/7"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/8"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/9"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/10"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/11"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/12"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/13"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/14"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/15"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/16"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/17"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/18"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/19"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/20"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/21"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/22"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/23"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/24"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/25"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/26"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth-1/0/27"} + ] + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/19==R155/eth-1/0/19"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/19==R199/eth-1/0/19"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/20==R149/eth-1/0/20"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/20==R199/eth-1/0/20"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/25==R155/eth-1/0/25"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/25==R149/eth-1/0/25"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/backup/descriptor_parent.json b/src/tests/ofc23/descriptors/backup/descriptor_parent.json new file mode 100644 index 0000000000000000000000000000000000000000..42b60e3cf09285955fbfbc567d977e60f78956be --- /dev/null +++ b/src/tests/ofc23/descriptors/backup/descriptor_parent.json @@ -0,0 +1,258 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-IP"}}, "device_type": "teraflowsdn", "device_drivers": [7], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW"}}, "device_type": "microwave-radio-system", "device_drivers": [4, 5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "nms5ux", "password": "nms5ux", "timeout": 120, "scheme": "https", + "node_ids": ["192.168.27.139", "192.168.27.140"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "OLS"}}, "device_type": "open-line-system", "device_drivers": [2], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "cttc-ols.cttc-ols.svc.cluster.local"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "4900"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "IPM"}}, "device_type": "xr-constellation", "device_drivers": [6], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8444"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "xr-user-1", "password": "xr-user-1", "hub_module_name": "OFC HUB 1", + "consistency-mode": "lifecycle", "import_topology": "devices" + }}} + ]} + }, + + + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "device_type": "emu-optical-splitter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "optical/internal", "uuid": "common"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf1"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf2"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf3"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==R149/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/22==DC1/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/9==MW/192.168.27.140:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.140:5==R149/eth-1/0/9"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.139:5==OFC HUB 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/1/1==MW/192.168.27.139:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/XR-T1==Optical-Splitter/common"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/common==OFC HUB 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf1==OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/79516f5e-55a0-5671-977a-1f5cc934e700==Optical-Splitter/leaf1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "79516f5e-55a0-5671-977a-1f5cc934e700"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf2==OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/30d9323e-b916-51ce-a9a8-cf88f62eb77f==Optical-Splitter/leaf2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "30d9323e-b916-51ce-a9a8-cf88f62eb77f"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/XR-T1==OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/68ac012e-54d4-5846-b5dc-6ec356404f90==OFC LEAF 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "68ac012e-54d4-5846-b5dc-6ec356404f90"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/XR-T1==OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/367b19b1-3172-54d8-bdd4-12d3ac5604f6==OFC LEAF 2/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "367b19b1-3172-54d8-bdd4-12d3ac5604f6"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/1/1==R155/eth-1/0/25"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/25==OFC LEAF 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/1/1==R199/eth-1/0/20"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/20==OFC LEAF 2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/22==DC2/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==R155/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/21==DC2/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth2==R199/eth-1/0/21"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/dc-2-dc-service.json b/src/tests/ofc23/descriptors/emulated/dc-2-dc-service.json new file mode 100644 index 0000000000000000000000000000000000000000..7c3be015d0965d4bdaed8e225e79da072a7de6f3 --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/dc-2-dc-service.json @@ -0,0 +1,41 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-svc"} + }, + "service_type": 2, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}}, + {"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}} + ], + "service_constraints": [ + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 15.2}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { + "address_families": ["IPV4"], "bgp_as": 65000, "bgp_route_target": "65000:123", + "mtu": 1512, "vlan_id": 300 + }}}, + {"action": 1, "custom": {"resource_key": "/device[PE1]/endpoint[1/1]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "10.0.0.1", + "address_ip": "3.3.1.1", "address_prefix": 24, "sub_interface_index": 1, "vlan_id": 300 + }}}, + {"action": 1, "custom": {"resource_key": "/device[PE2]/endpoint[1/1]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "10.0.0.2", + "address_ip": "3.3.2.1", "address_prefix": 24, "sub_interface_index": 1, "vlan_id": 300 + }}}, + {"action": 1, "custom": {"resource_key": "/device[PE3]/endpoint[1/1]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "10.0.0.3", + "address_ip": "3.3.3.1", "address_prefix": 24, "sub_interface_index": 1, "vlan_id": 300 + }}}, + {"action": 1, "custom": {"resource_key": "/device[PE4]/endpoint[1/1]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "10.0.0.4", + "address_ip": "3.3.4.1", "address_prefix": 24, "sub_interface_index": 1, "vlan_id": 300 + }}} + ]} + } + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/descriptor_child.json b/src/tests/ofc23/descriptors/emulated/descriptor_child.json new file mode 100644 index 0000000000000000000000000000000000000000..1dc6fd35531db1989b9b85c846b6fc8d0524f08f --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/descriptor_child.json @@ -0,0 +1,149 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "PE1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "PE2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "PE3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "PE4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + } + ], + "links": [ + + { + "link_id": {"link_uuid": {"uuid": "PE1/2/2==PE2/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE1/2/3==PE3/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE1/2/4==PE4/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/4"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "PE2/2/1==PE1/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE2/2/3==PE3/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE2/2/4==PE4/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/4"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "PE3/2/1==PE1/2/3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE3/2/2==PE2/2/3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE4/2/2==PE2/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "PE4/2/1==PE1/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE4/2/2==PE2/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE4/2/3==PE3/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + } + + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/descriptor_parent.json b/src/tests/ofc23/descriptors/emulated/descriptor_parent.json new file mode 100644 index 0000000000000000000000000000000000000000..1b1f5dbfd57b2e1543e86ba8d2633a0e944fced5 --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/descriptor_parent.json @@ -0,0 +1,258 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-IP"}}, "device_type": "teraflowsdn", "device_drivers": [7], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW"}}, "device_type": "microwave-radio-system", "device_drivers": [4, 5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "timeout": 120, "scheme": "https", + "node_ids": ["192.168.27.139", "192.168.27.140"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "OLS"}}, "device_type": "open-line-system", "device_drivers": [2], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "cttc-ols.cttc-ols.svc.cluster.local"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "4900"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "IPM"}}, "device_type": "xr-constellation", "device_drivers": [6], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8444"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "xr-user-1", "password": "xr-user-1", "hub_module_name": "OFC HUB 1", + "consistency-mode": "lifecycle", "import_topology": "devices" + }}} + ]} + }, + + + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "device_type": "emu-optical-splitter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "optical/internal", "uuid": "common"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf1"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf2"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf3"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==R149/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/22==DC1/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/9==MW/192.168.27.140:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.140:5==R149/eth-1/0/9"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.139:5==OFC HUB 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/1/1==MW/192.168.27.139:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/XR-T1==Optical-Splitter/common"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/common==OFC HUB 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf1==OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/79516f5e-55a0-5671-977a-1f5cc934e700==Optical-Splitter/leaf1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "79516f5e-55a0-5671-977a-1f5cc934e700"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf2==OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/30d9323e-b916-51ce-a9a8-cf88f62eb77f==Optical-Splitter/leaf2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "30d9323e-b916-51ce-a9a8-cf88f62eb77f"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/XR-T1==OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/68ac012e-54d4-5846-b5dc-6ec356404f90==OFC LEAF 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "68ac012e-54d4-5846-b5dc-6ec356404f90"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/XR-T1==OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/367b19b1-3172-54d8-bdd4-12d3ac5604f6==OFC LEAF 2/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "367b19b1-3172-54d8-bdd4-12d3ac5604f6"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/1/1==R155/eth-1/0/25"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/25==OFC LEAF 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/1/1==R199/eth-1/0/20"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/20==OFC LEAF 2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/22==DC2/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==R155/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/21==DC2/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth2==R199/eth-1/0/21"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/descriptor_parent_noxr.json b/src/tests/ofc23/descriptors/emulated/descriptor_parent_noxr.json new file mode 100644 index 0000000000000000000000000000000000000000..c4a6646ede081fc2f6ee449d7771de3dbcbd77ec --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/descriptor_parent_noxr.json @@ -0,0 +1,332 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-IP"}}, "device_type": "teraflowsdn", "device_drivers": [7], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW1-2"}}, "device_type": "microwave-radio-system", "device_drivers": [5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "timeout": 120, "scheme": "https", + "node_ids": ["172.18.0.1", "172.18.0.2"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW3-4"}}, "device_type": "microwave-radio-system", "device_drivers": [5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "timeout": 120, "scheme": "https", + "node_ids": ["172.18.0.3", "172.18.0.4"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "OLS"}}, "device_type": "open-line-system", "device_drivers": [2], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "cttc-ols.cttc-ols.svc.cluster.local"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "4900"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "device_type": "emu-optical-splitter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "optical/internal", "uuid": "common"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf1"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf2"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf3"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "1/2"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==PE1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE1/1/1==DC1/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "DC1/eth2==PE2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE2/1/1==DC1/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE1/1/2==MW1-2/172.18.0.1:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.1:1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW1-2/172.18.0.1:1==PE1/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.1:1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW1-2/172.18.0.2:1==R1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.2:1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1/1/1==MW1-2/172.18.0.2:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.2:1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE2/1/2==MW3-4/172.18.0.3:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.3:1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW3-4/172.18.0.3:1==PE2/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.3:1"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW3-4/172.18.0.4:1==R1/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.4:1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1/1/2==MW3-4/172.18.0.4:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.4:1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R1/1/3==Optical-Splitter/common"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/3"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/common==R1/1/3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/3"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf1==OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/79516f5e-55a0-5671-977a-1f5cc934e700==Optical-Splitter/leaf1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "79516f5e-55a0-5671-977a-1f5cc934e700"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf2==OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/30d9323e-b916-51ce-a9a8-cf88f62eb77f==Optical-Splitter/leaf2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "30d9323e-b916-51ce-a9a8-cf88f62eb77f"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R2/1/1==OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/68ac012e-54d4-5846-b5dc-6ec356404f90==R2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "68ac012e-54d4-5846-b5dc-6ec356404f90"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R3/1/1==OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/367b19b1-3172-54d8-bdd4-12d3ac5604f6==R3/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "367b19b1-3172-54d8-bdd4-12d3ac5604f6"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R2/1/2==PE3/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE3/1/2==R2/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R3/1/2==PE4/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE4/1/2==R3/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE3/1/1==DC2/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==PE3/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE4/1/1==DC2/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth2==PE4/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/ipm-ctrl.json b/src/tests/ofc23/descriptors/emulated/ipm-ctrl.json new file mode 100644 index 0000000000000000000000000000000000000000..91e9de611dac2627525bb11f81755ea651887e74 --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/ipm-ctrl.json @@ -0,0 +1,25 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "XR-CONSTELLATION"}}, + "device_type": "xr-constellation", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8444"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "xr-user-1", "password": "xr-user-1", "hub_module_name": "OFC HUB 1", + "consistency-mode": "lifecycle" + }}} + ]}, + "device_operational_status": 1, + "device_drivers": [6], + "device_endpoints": [] + } + ] +} diff --git a/src/tests/ofc23/descriptors/emulated/old/descriptor_parent.json b/src/tests/ofc23/descriptors/emulated/old/descriptor_parent.json new file mode 100644 index 0000000000000000000000000000000000000000..413b7566292d7841777547aeb665c7eb3b8ca293 --- /dev/null +++ b/src/tests/ofc23/descriptors/emulated/old/descriptor_parent.json @@ -0,0 +1,311 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-IP"}}, "device_type": "teraflowsdn", "device_drivers": [7], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW1-2"}}, "device_type": "microwave-radio-system", "device_drivers": [5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "timeout": 120, "scheme": "https", + "node_ids": ["172.18.0.1", "172.18.0.2"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW3-4"}}, "device_type": "microwave-radio-system", "device_drivers": [5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "timeout": 120, "scheme": "https", + "node_ids": ["172.18.0.3", "172.18.0.4"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "OLS"}}, "device_type": "open-line-system", "device_drivers": [2], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "cttc-ols.cttc-ols.svc.cluster.local"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "4900"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "IPM"}}, "device_type": "xr-constellation", "device_drivers": [6], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8444"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "xr-user-1", "password": "xr-user-1", "hub_module_name": "OFC HUB 1", + "consistency-mode": "lifecycle", "import_topology": "devices" + }}} + ]} + }, + + + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "device_type": "emu-optical-splitter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "optical/internal", "uuid": "common"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf1"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf2"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf3"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==PE1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE1/1/1==DC1/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "DC1/eth2==PE2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE2/1/1==DC1/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE1/1/2==MW1-2/172.18.0.1:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.1:1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW1-2/172.18.0.1:1==PE1/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.1:1"}}, + {"device_id": {"device_uuid": {"uuid": "PE1"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW1-2/172.18.0.2:1==OFC HUB 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.2:1"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/1/1==MW1-2/172.18.0.2:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "MW1-2"}}, "endpoint_uuid": {"uuid": "172.18.0.2:1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE2/1/2==MW3-4/172.18.0.3:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.3:1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW3-4/172.18.0.3:1==PE2/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.3:1"}}, + {"device_id": {"device_uuid": {"uuid": "PE2"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW3-4/172.18.0.4:1==OFC HUB 1/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.4:1"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/1/2==MW3-4/172.18.0.4:1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "MW3-4"}}, "endpoint_uuid": {"uuid": "172.18.0.4:1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/XR-T1==Optical-Splitter/common"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/common==OFC HUB 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf1==OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/79516f5e-55a0-5671-977a-1f5cc934e700==Optical-Splitter/leaf1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "79516f5e-55a0-5671-977a-1f5cc934e700"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf2==OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/30d9323e-b916-51ce-a9a8-cf88f62eb77f==Optical-Splitter/leaf2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "30d9323e-b916-51ce-a9a8-cf88f62eb77f"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/XR-T1==OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/68ac012e-54d4-5846-b5dc-6ec356404f90==OFC LEAF 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "68ac012e-54d4-5846-b5dc-6ec356404f90"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/XR-T1==OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/367b19b1-3172-54d8-bdd4-12d3ac5604f6==OFC LEAF 2/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "367b19b1-3172-54d8-bdd4-12d3ac5604f6"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/1/1==PE3/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE3/1/2==OFC LEAF 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/1/1==PE4/1/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "PE4/1/2==OFC LEAF 2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE3/1/1==DC2/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==PE3/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "PE3"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "PE4/1/1==DC2/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth2==PE4/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "PE4"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/real/dc-2-dc-service.json b/src/tests/ofc23/descriptors/real/dc-2-dc-service.json new file mode 100644 index 0000000000000000000000000000000000000000..3a83afa6de81f137204aecc5f0eca476aad71e61 --- /dev/null +++ b/src/tests/ofc23/descriptors/real/dc-2-dc-service.json @@ -0,0 +1,37 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-svc"} + }, + "service_type": 2, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}}, + {"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}} + ], + "service_constraints": [ + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 15.2}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { + "address_families": ["IPV4"], "bgp_as": 65000, "bgp_route_target": "65000:123", + "mtu": 1512, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R149]/endpoint[eth-1/0/22]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.5", + "address_ip": "172.16.4.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R155]/endpoint[eth-1/0/22]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.1", + "address_ip": "172.16.2.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R199]/endpoint[eth-1/0/21]/settings", "resource_value": { + "route_distinguisher": "65000:123", "router_id": "5.5.5.6", + "address_ip": "172.16.1.1", "address_prefix": 24, "sub_interface_index": 0, "vlan_id": 111 + }}} + ]} + } + ] +} diff --git a/src/tests/ofc23/descriptors/real/descriptor_child.json b/src/tests/ofc23/descriptors/real/descriptor_child.json new file mode 100644 index 0000000000000000000000000000000000000000..8d695cfd2d419f263b554d0f2bf648b92cdde672 --- /dev/null +++ b/src/tests/ofc23/descriptors/real/descriptor_child.json @@ -0,0 +1,93 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R199"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.199"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 86400} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R149"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.149"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 86400} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R155"}}, "device_type": "packet-router", "device_drivers": [1], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.155"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "830"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", + "force_running": false, "hostkey_verify": false, "look_for_keys": false, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "huaweiyang"}, + "manager_params": {"timeout" : 86400} + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/19==R155/eth-1/0/19"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/19==R199/eth-1/0/19"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/19"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/20==R149/eth-1/0/20"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/20==R199/eth-1/0/20"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/25==R155/eth-1/0/25"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/25==R149/eth-1/0/25"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + } + ] +} diff --git a/src/tests/ofc23/descriptors/real/descriptor_parent.json b/src/tests/ofc23/descriptors/real/descriptor_parent.json new file mode 100644 index 0000000000000000000000000000000000000000..3317d46edaf6d270125d8b094c3b6384a3dd52fd --- /dev/null +++ b/src/tests/ofc23/descriptors/real/descriptor_parent.json @@ -0,0 +1,258 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-IP"}}, "device_type": "teraflowsdn", "device_drivers": [7], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MW"}}, "device_type": "microwave-radio-system", "device_drivers": [4, 5], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "192.168.27.136"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "nms5ux", "password": "nms5ux", "timeout": 120, "scheme": "https", + "node_ids": ["192.168.27.139", "192.168.27.140"] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "OLS"}}, "device_type": "open-line-system", "device_drivers": [2], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "cttc-ols.cttc-ols.svc.cluster.local"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "4900"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "IPM"}}, "device_type": "xr-constellation", "device_drivers": [6], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.95.86.126"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "xr-user-1", "password": "xr-user-1", "hub_module_name": "OFC HUB 1", + "consistency-mode": "lifecycle", "import_topology": "devices" + }}} + ]} + }, + + + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "device_type": "emu-optical-splitter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "optical/internal", "uuid": "common"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf1"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf2"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf3"}, + {"sample_types": [], "type": "optical/internal", "uuid": "leaf4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 0, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper/internal", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/internal", "uuid": "eth2"}, + {"sample_types": [], "type": "copper/internal", "uuid": "int"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==R149/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/22==DC1/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R149/eth-1/0/9==MW/192.168.27.140:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.140:5==R149/eth-1/0/9"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.140:5"}}, + {"device_id": {"device_uuid": {"uuid": "R149"}}, "endpoint_uuid": {"uuid": "eth-1/0/9"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "MW/192.168.27.139:5==OFC HUB 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/1/1==MW/192.168.27.139:5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "MW"}}, "endpoint_uuid": {"uuid": "192.168.27.139:5"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC HUB 1/XR-T1==Optical-Splitter/common"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/common==OFC HUB 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "common"}}, + {"device_id": {"device_uuid": {"uuid": "OFC HUB 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf1==OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/79516f5e-55a0-5671-977a-1f5cc934e700==Optical-Splitter/leaf1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "79516f5e-55a0-5671-977a-1f5cc934e700"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "Optical-Splitter/leaf2==OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/30d9323e-b916-51ce-a9a8-cf88f62eb77f==Optical-Splitter/leaf2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "30d9323e-b916-51ce-a9a8-cf88f62eb77f"}}, + {"device_id": {"device_uuid": {"uuid": "Optical-Splitter"}}, "endpoint_uuid": {"uuid": "leaf2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/XR-T1==OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/68ac012e-54d4-5846-b5dc-6ec356404f90==OFC LEAF 1/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "68ac012e-54d4-5846-b5dc-6ec356404f90"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/XR-T1==OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}}, + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "OLS/367b19b1-3172-54d8-bdd4-12d3ac5604f6==OFC LEAF 2/XR-T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OLS"}}, "endpoint_uuid": {"uuid": "367b19b1-3172-54d8-bdd4-12d3ac5604f6"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "XR-T1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 1/1/1==R155/eth-1/0/25"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/25==OFC LEAF 1/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/25"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "OFC LEAF 2/1/1==R199/eth-1/0/20"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/20==OFC LEAF 2/1/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/20"}}, + {"device_id": {"device_uuid": {"uuid": "OFC LEAF 2"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R155/eth-1/0/22==DC2/eth1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==R155/eth-1/0/22"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "R155"}}, "endpoint_uuid": {"uuid": "eth-1/0/22"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "R199/eth-1/0/21==DC2/eth2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DC2/eth2==R199/eth-1/0/21"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth2"}}, + {"device_id": {"device_uuid": {"uuid": "R199"}}, "endpoint_uuid": {"uuid": "eth-1/0/21"}} + ] + } + ] +} diff --git a/src/tests/ofc23/dump_logs.sh b/src/tests/ofc23/dump_logs.sh new file mode 100755 index 0000000000000000000000000000000000000000..cc3162b337c1b35e9ff158b400a8d5c47931bdca --- /dev/null +++ b/src/tests/ofc23/dump_logs.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +rm -rf tmp/exec + +echo "Collecting logs for Parent..." +mkdir -p tmp/exec/parent +kubectl --namespace tfs-parent logs deployments/contextservice server > tmp/exec/parent/context.log +kubectl --namespace tfs-parent logs deployments/deviceservice server > tmp/exec/parent/device.log +kubectl --namespace tfs-parent logs deployments/serviceservice server > tmp/exec/parent/service.log +kubectl --namespace tfs-parent logs deployments/pathcompservice frontend > tmp/exec/parent/pathcomp-frontend.log +kubectl --namespace tfs-parent logs deployments/pathcompservice backend > tmp/exec/parent/pathcomp-backend.log +kubectl --namespace tfs-parent logs deployments/sliceservice server > tmp/exec/parent/slice.log +printf "\n" + +echo "Collecting logs for Child..." +mkdir -p tmp/exec/child +kubectl --namespace tfs-child logs deployments/contextservice server > tmp/exec/child/context.log +kubectl --namespace tfs-child logs deployments/deviceservice server > tmp/exec/child/device.log +kubectl --namespace tfs-child logs deployments/serviceservice server > tmp/exec/child/service.log +kubectl --namespace tfs-child logs deployments/pathcompservice frontend > tmp/exec/child/pathcomp-frontend.log +kubectl --namespace tfs-child logs deployments/pathcompservice backend > tmp/exec/child/pathcomp-backend.log +kubectl --namespace tfs-child logs deployments/sliceservice server > tmp/exec/child/slice.log +printf "\n" + +echo "Done!" diff --git a/src/tests/ofc23/fast_redeploy.sh b/src/tests/ofc23/fast_redeploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..58d1193ded582d4fdff3222d5bcdc0fe510a7034 --- /dev/null +++ b/src/tests/ofc23/fast_redeploy.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +kubectl delete namespace tfs-parent tfs-child + +echo "Deploying tfs-parent ..." +kubectl delete -f ofc23/nginx-ingress-controller-parent.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl create namespace tfs-parent > ./tmp/logs/deploy-tfs-parent.log +kubectl apply -f ofc23/nginx-ingress-controller-parent.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/contextservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/deviceservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/pathcompservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/serviceservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/sliceservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ./tmp/manifests/webuiservice.yaml > ./tmp/logs/deploy-tfs-parent.log +kubectl --namespace tfs-parent apply -f ofc23/tfs-ingress-parent.yaml > ./tmp/logs/deploy-tfs-parent.log +printf "\n" + +echo "Deploying tfs-child ..." +kubectl delete -f ofc23/nginx-ingress-controller-child.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl create namespace tfs-child > ./tmp/logs/deploy-tfs-child.log +kubectl apply -f ofc23/nginx-ingress-controller-child.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/contextservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/deviceservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/pathcompservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/serviceservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/sliceservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ./tmp/manifests/webuiservice.yaml > ./tmp/logs/deploy-tfs-child.log +kubectl --namespace tfs-child apply -f ofc23/tfs-ingress-child.yaml > ./tmp/logs/deploy-tfs-child.log +printf "\n" + +echo "Waiting tfs-parent ..." +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/contextservice +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/deviceservice +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/pathcompservice +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/serviceservice +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/sliceservice +kubectl wait --namespace tfs-parent --for='condition=available' --timeout=300s deployment/webuiservice +printf "\n" + +echo "Waiting tfs-child ..." +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/contextservice +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/deviceservice +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/pathcompservice +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/serviceservice +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/sliceservice +kubectl wait --namespace tfs-child --for='condition=available' --timeout=300s deployment/webuiservice +printf "\n" + +echo "Done!" diff --git a/src/tests/ofc23/nginx-ingress-controller-child.yaml b/src/tests/ofc23/nginx-ingress-controller-child.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00a64d75e9a9a2cb93cdbd6d89790e26b0730eb6 --- /dev/null +++ b/src/tests/ofc23/nginx-ingress-controller-child.yaml @@ -0,0 +1,134 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-load-balancer-microk8s-conf-child + namespace: ingress +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-udp-microk8s-conf-child + namespace: ingress +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-tcp-microk8s-conf-child + namespace: ingress +--- +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: tfs-ingress-class-child + annotations: + ingressclass.kubernetes.io/is-default-class: "false" +spec: + controller: tfs.etsi.org/controller-class-child +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-ingress-microk8s-controller-child + namespace: ingress + labels: + microk8s-application: nginx-ingress-microk8s-child +spec: + selector: + matchLabels: + name: nginx-ingress-microk8s-child + updateStrategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + name: nginx-ingress-microk8s-child + spec: + terminationGracePeriodSeconds: 60 + restartPolicy: Always + serviceAccountName: nginx-ingress-microk8s-serviceaccount + containers: + - image: k8s.gcr.io/ingress-nginx/controller:v1.2.0 + imagePullPolicy: IfNotPresent + name: nginx-ingress-microk8s + livenessProbe: + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 5 + lifecycle: + preStop: + exec: + command: + - /wait-shutdown + securityContext: + capabilities: + add: + - NET_BIND_SERVICE + drop: + - ALL + runAsUser: 101 # www-data + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + ports: + - name: http + containerPort: 80 + hostPort: 8002 + protocol: TCP + - name: https + containerPort: 443 + hostPort: 4432 + protocol: TCP + - name: health + containerPort: 10254 + hostPort: 12542 + protocol: TCP + args: + - /nginx-ingress-controller + - --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf-child + - --tcp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-tcp-microk8s-conf-child + - --udp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-udp-microk8s-conf-child + - --election-id=ingress-controller-leader-child + - --controller-class=tfs.etsi.org/controller-class-child + - --ingress-class=tfs-ingress-class-child + - ' ' + - --publish-status-address=127.0.0.1 diff --git a/src/tests/ofc23/nginx-ingress-controller-parent.yaml b/src/tests/ofc23/nginx-ingress-controller-parent.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c504c2e6766c1ad5b81a2479b4d05a09ba46d906 --- /dev/null +++ b/src/tests/ofc23/nginx-ingress-controller-parent.yaml @@ -0,0 +1,134 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-load-balancer-microk8s-conf-parent + namespace: ingress +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-udp-microk8s-conf-parent + namespace: ingress +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-tcp-microk8s-conf-parent + namespace: ingress +--- +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: tfs-ingress-class-parent + annotations: + ingressclass.kubernetes.io/is-default-class: "false" +spec: + controller: tfs.etsi.org/controller-class-parent +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-ingress-microk8s-controller-parent + namespace: ingress + labels: + microk8s-application: nginx-ingress-microk8s-parent +spec: + selector: + matchLabels: + name: nginx-ingress-microk8s-parent + updateStrategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + name: nginx-ingress-microk8s-parent + spec: + terminationGracePeriodSeconds: 60 + restartPolicy: Always + serviceAccountName: nginx-ingress-microk8s-serviceaccount + containers: + - image: k8s.gcr.io/ingress-nginx/controller:v1.2.0 + imagePullPolicy: IfNotPresent + name: nginx-ingress-microk8s + livenessProbe: + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 5 + lifecycle: + preStop: + exec: + command: + - /wait-shutdown + securityContext: + capabilities: + add: + - NET_BIND_SERVICE + drop: + - ALL + runAsUser: 101 # www-data + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + ports: + - name: http + containerPort: 80 + hostPort: 8001 + protocol: TCP + - name: https + containerPort: 443 + hostPort: 4431 + protocol: TCP + - name: health + containerPort: 10254 + hostPort: 12541 + protocol: TCP + args: + - /nginx-ingress-controller + - --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf-parent + - --tcp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-tcp-microk8s-conf-parent + - --udp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-udp-microk8s-conf-parent + - --election-id=ingress-controller-leader-parent + - --controller-class=tfs.etsi.org/controller-class-parent + - --ingress-class=tfs-ingress-class-parent + - ' ' + - --publish-status-address=127.0.0.1 diff --git a/src/tests/ofc23/show_deploy.sh b/src/tests/ofc23/show_deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..d4e112b0f494e4a6dba964eda4e31652b8548043 --- /dev/null +++ b/src/tests/ofc23/show_deploy.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +echo "Deployment Resources:" +kubectl --namespace tfs-parent get all +printf "\n" + +echo "Deployment Ingress:" +kubectl --namespace tfs-parent get ingress +printf "\n" + +echo "Deployment Resources:" +kubectl --namespace tfs-child get all +printf "\n" + +echo "Deployment Ingress:" +kubectl --namespace tfs-child get ingress +printf "\n" diff --git a/src/tests/ofc23/show_deploy_sligrp.sh b/src/tests/ofc23/show_deploy_sligrp.sh new file mode 100755 index 0000000000000000000000000000000000000000..b5e3600ba99ec2e4de4a953f99c44ed2d88bba57 --- /dev/null +++ b/src/tests/ofc23/show_deploy_sligrp.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +echo "Deployment Resources:" +kubectl --namespace tfs get all +printf "\n" + +echo "Deployment Ingress:" +kubectl --namespace tfs get ingress +printf "\n" diff --git a/src/tests/ofc23/tfs-ingress-child.yaml b/src/tests/ofc23/tfs-ingress-child.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a93b9321c9f25c78e8423413c4225f78c7aee719 --- /dev/null +++ b/src/tests/ofc23/tfs-ingress-child.yaml @@ -0,0 +1,53 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: tfs-ingress-child + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 +spec: + ingressClassName: tfs-ingress-class-child + rules: + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /context(/|$)(.*) + pathType: Prefix + backend: + service: + name: contextservice + port: + number: 8080 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: computeservice + port: + number: 8080 diff --git a/src/tests/ofc23/tfs-ingress-parent.yaml b/src/tests/ofc23/tfs-ingress-parent.yaml new file mode 100644 index 0000000000000000000000000000000000000000..baf506dd90f320a1913beb8becd39164daa21370 --- /dev/null +++ b/src/tests/ofc23/tfs-ingress-parent.yaml @@ -0,0 +1,53 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: tfs-ingress-parent + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 +spec: + ingressClassName: tfs-ingress-class-parent + rules: + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /context(/|$)(.*) + pathType: Prefix + backend: + service: + name: contextservice + port: + number: 8080 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: computeservice + port: + number: 8080 diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py new file mode 100644 index 0000000000000000000000000000000000000000..ecac81be7e3bdff1dcbac458142ea15bf367a1a1 --- /dev/null +++ b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py @@ -0,0 +1,192 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Mock IPM controller (implements minimal support) + +import functools, json, logging, sys, time, uuid +from typing import Any, Dict, Optional, Tuple +from flask import Flask, jsonify, make_response, request +from flask_restful import Api, Resource + +BIND_ADDRESS = '0.0.0.0' +BIND_PORT = 8444 +IPM_USERNAME = 'xr-user-1' +IPM_PASSWORD = 'xr-user-1' +STR_ENDPOINT = 'https://{:s}:{:s}'.format(str(BIND_ADDRESS), str(BIND_PORT)) +LOG_LEVEL = logging.DEBUG + +CONSTELLATION = { + 'id': 'ofc-constellation', + 'hubModule': {'state': { + 'module': {'moduleName': 'OFC HUB 1', 'trafficMode': 'L1Mode', 'capacity': 100}, + 'endpoints': [{'moduleIf': {'clientIfAid': 'XR-T1'}}, {'moduleIf': {'clientIfAid': 'XR-T4'}}] + }}, + 'leafModules': [ + {'state': { + 'module': {'moduleName': 'OFC LEAF 1', 'trafficMode': 'L1Mode', 'capacity': 100}, + 'endpoints': [{'moduleIf': {'clientIfAid': 'XR-T1'}}] + }}, + {'state': { + 'module': {'moduleName': 'OFC LEAF 2', 'trafficMode': 'L1Mode', 'capacity': 100}, + 'endpoints': [{'moduleIf': {'clientIfAid': 'XR-T1'}}] + }} + ] +} + +CONNECTIONS : Dict[str, Any] = dict() +STATE_NAME_TO_CONNECTION : Dict[str, str] = dict() + +def select_module_state(module_name : str) -> Optional[Dict]: + hub_module_state = CONSTELLATION.get('hubModule', {}).get('state', {}) + if module_name == hub_module_state.get('module', {}).get('moduleName'): return hub_module_state + for leaf_module in CONSTELLATION.get('leafModules', []): + leaf_module_state = leaf_module.get('state', {}) + if module_name == leaf_module_state.get('module', {}).get('moduleName'): return leaf_module_state + return None + +def select_endpoint(module_state : Dict, module_if : str) -> Optional[Dict]: + for endpoint in module_state.get('endpoints', []): + if module_if == endpoint.get('moduleIf', {}).get('clientIfAid'): return endpoint + return None + +def select_module_endpoint(selector : Dict) -> Optional[Tuple[Dict, Dict]]: + selected_module_name = selector['moduleIfSelectorByModuleName']['moduleName'] + selected_module_if = selector['moduleIfSelectorByModuleName']['moduleClientIfAid'] + module_state = select_module_state(selected_module_name) + if module_state is None: return None + return module_state, select_endpoint(module_state, selected_module_if) + +def compose_endpoint(endpoint_selector : Dict) -> Dict: + module, endpoint = select_module_endpoint(endpoint_selector['selector']) + return { + 'href': '/' + str(uuid.uuid4()), + 'state': { + 'moduleIf': { + 'moduleName': module['module']['moduleName'], + 'clientIfAid': endpoint['moduleIf']['clientIfAid'], + }, + 'capacity': module['module']['capacity'], + } + } + +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) + +logging.getLogger('werkzeug').setLevel(logging.WARNING) + +def log_request(logger : logging.Logger, response): + timestamp = time.strftime('[%Y-%b-%d %H:%M]') + logger.info('%s %s %s %s %s', timestamp, request.remote_addr, request.method, request.full_path, response.status) + return response + +class OpenIdConnect(Resource): + ACCESS_TOKENS = {} + + def post(self): + if request.content_type != 'application/x-www-form-urlencoded': return make_response('bad content type', 400) + if request.content_length == 0: return make_response('bad content length', 400) + request_form = request.form + if request_form.get('client_id') != 'xr-web-client': return make_response('bad client_id', 403) + if request_form.get('client_secret') != 'xr-web-client': return make_response('bad client_secret', 403) + if request_form.get('grant_type') != 'password': return make_response('bad grant_type', 403) + if request_form.get('username') != IPM_USERNAME: return make_response('bad username', 403) + if request_form.get('password') != IPM_PASSWORD: return make_response('bad password', 403) + access_token = OpenIdConnect.ACCESS_TOKENS.setdefault(IPM_USERNAME, uuid.uuid4()) + reply = {'access_token': access_token, 'expires_in': 86400} + return make_response(jsonify(reply), 200) + +class XrNetworks(Resource): + def get(self): + query = json.loads(request.args.get('q')) + hub_module_name = query.get('hubModule.state.module.moduleName') + if hub_module_name != 'OFC HUB 1': return make_response('unexpected hub module', 404) + return make_response(jsonify([CONSTELLATION]), 200) + +class XrNetworkConnections(Resource): + def get(self): + query = json.loads(request.args.get('q')) + state_name = query.get('state.name') + if state_name is None: + connections = [connection for connection in CONNECTIONS.values()] + else: + connection_uuid = STATE_NAME_TO_CONNECTION.get(state_name) + if connection_uuid is None: return make_response('state name not found', 404) + connection = CONNECTIONS.get(connection_uuid) + if connection is None: return make_response('connection for state name not found', 404) + connections = [connection] + return make_response(jsonify(connections), 200) + + def post(self): + if request.content_type != 'application/json': return make_response('bad content type', 400) + if request.content_length == 0: return make_response('bad content length', 400) + request_json = request.json + if not isinstance(request_json, list): return make_response('content is not list', 400) + reply = [] + for connection in request_json: + connection_uuid = str(uuid.uuid4()) + state_name = connection['name'] + + if state_name is not None: STATE_NAME_TO_CONNECTION[state_name] = connection_uuid + CONNECTIONS[connection_uuid] = { + 'href': '/network-connections/{:s}'.format(str(connection_uuid)), + 'config': { + 'implicitTransportCapacity': connection['implicitTransportCapacity'] + # 'mc': ?? + }, + 'state': { + 'name': state_name, + 'serviceMode': connection['serviceMode'] + # 'outerVID' : ?? + }, + 'endpoints': [ + compose_endpoint(endpoint) + for endpoint in connection['endpoints'] + ] + } + reply.append(CONNECTIONS[connection_uuid]) + return make_response(jsonify(reply), 202) + +class XrNetworkConnection(Resource): + def get(self, connection_uuid : str): + connection = CONNECTIONS.get(connection_uuid) + if connection is None: return make_response('unexpected connection id', 404) + return make_response(jsonify(connection), 200) + + def delete(self, connection_uuid : str): + connection = CONNECTIONS.pop(connection_uuid, None) + if connection is None: return make_response('unexpected connection id', 404) + state_name = connection['state']['name'] + STATE_NAME_TO_CONNECTION.pop(state_name, None) + return make_response(jsonify({}), 202) + +def main(): + LOGGER.info('Starting...') + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app) + api.add_resource(OpenIdConnect, '/realms/xr-cm/protocol/openid-connect/token') + api.add_resource(XrNetworks, '/api/v1/xr-networks') + api.add_resource(XrNetworkConnections, '/api/v1/network-connections') + api.add_resource(XrNetworkConnection, '/api/v1/network-connections/') + + LOGGER.info('Listening on {:s}...'.format(str(STR_ENDPOINT))) + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT, ssl_context='adhoc') + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/run.sh b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..2aa78712c58d8cc255b60202d1576de683798d2e --- /dev/null +++ b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +python MockIPMSdnCtrl.py diff --git a/src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py similarity index 54% rename from src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py rename to src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py index 63be214b671c2ee9b222d92e6f964a4203b8a587..c20dde1b9958fb92e4c6f026fbfe55f9ba348ba1 100644 --- a/src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py +++ b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py @@ -25,8 +25,7 @@ # Ref: https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful import functools, logging, sys, time -from flask import Flask, abort, request -from flask.json import jsonify +from flask import Flask, abort, jsonify, make_response, request from flask_restful import Api, Resource BIND_ADDRESS = '0.0.0.0' @@ -36,31 +35,51 @@ STR_ENDPOINT = 'https://{:s}:{:s}{:s}'.format(str(BIND_ADDRESS), str(BIND_PORT), LOG_LEVEL = logging.DEBUG NETWORK_NODES = [ - {'node-id': '172.18.0.1', 'ietf-network-topology:termination-point': [ - {'tp-id': '172.18.0.1:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, - {'tp-id': '172.18.0.1:2', 'ietf-te-topology:te': {'name': 'antena' }}, + {'node-id': '192.168.27.139', 'ietf-network-topology:termination-point': [ + {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '2', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '3', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '4', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '5', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '6', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '10', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, - {'node-id': '172.18.0.2', 'ietf-network-topology:termination-point': [ - {'tp-id': '172.18.0.2:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, - {'tp-id': '172.18.0.2:2', 'ietf-te-topology:te': {'name': 'antena' }}, + {'node-id': '192.168.27.140', 'ietf-network-topology:termination-point': [ + {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '2', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '3', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '4', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '5', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '6', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '10', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, - {'node-id': '172.18.0.3', 'ietf-network-topology:termination-point': [ - {'tp-id': '172.18.0.3:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, - {'tp-id': '172.18.0.3:2', 'ietf-te-topology:te': {'name': 'antena' }}, + {'node-id': '192.168.27.141', 'ietf-network-topology:termination-point': [ + {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '2', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '3', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '4', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '5', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '6', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '10', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, - {'node-id': '172.18.0.4', 'ietf-network-topology:termination-point': [ - {'tp-id': '172.18.0.4:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, - {'tp-id': '172.18.0.4:2', 'ietf-te-topology:te': {'name': 'antena' }}, + {'node-id': '192.168.27.142', 'ietf-network-topology:termination-point': [ + {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '2', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '3', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '4', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '5', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '6', 'ietf-te-topology:te': {'name': 'ethernet'}}, + {'tp-id': '10', 'ietf-te-topology:te': {'name': 'antena' }}, ]} ] NETWORK_LINKS = [ - { - 'source' : {'source-node': '172.18.0.1', 'source-tp': '172.18.0.1:2'}, - 'destination': {'dest-node' : '172.18.0.2', 'dest-tp' : '172.18.0.2:2'}, + { 'link-id' : '192.168.27.139:10--192.168.27.140:10', + 'source' : {'source-node': '192.168.27.139', 'source-tp': '10'}, + 'destination': {'dest-node' : '192.168.27.140', 'dest-tp' : '10'}, }, - { - 'source' : {'source-node': '172.18.0.3', 'source-tp': '172.18.0.3:2'}, - 'destination': {'dest-node' : '172.18.0.4', 'dest-tp' : '172.18.0.4:2'}, + { 'link-id' : '192.168.27.141:10--192.168.27.142:10', + 'source' : {'source-node': '192.168.27.141', 'source-tp': '10'}, + 'destination': {'dest-node' : '192.168.27.142', 'dest-tp' : '10'}, } ] NETWORK_SERVICES = {} @@ -77,21 +96,22 @@ def log_request(logger : logging.Logger, response): return response class Health(Resource): - def get(self): return jsonify({}) + def get(self): + return make_response(jsonify({}), 200) class Network(Resource): def get(self, network_uuid : str): if network_uuid != 'SIAE-ETH-TOPOLOGY': abort(400) network = {'node': NETWORK_NODES, 'ietf-network-topology:link': NETWORK_LINKS} - return jsonify({'ietf-network:network': network}) + return make_response(jsonify({'ietf-network:network': network}), 200) class Services(Resource): def get(self): services = [service for service in NETWORK_SERVICES.values()] - return jsonify({'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': services}}) + return make_response(jsonify({'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': services}}), 200) def post(self): - json_request = request.json + json_request = request.get_json() if not json_request: abort(400) if not isinstance(json_request, dict): abort(400) if 'etht-svc-instances' not in json_request: abort(400) @@ -101,12 +121,12 @@ class Services(Resource): svc_data = json_services[0] etht_svc_name = svc_data['etht-svc-name'] NETWORK_SERVICES[etht_svc_name] = svc_data - return jsonify({}), 201 + return make_response(jsonify({}), 201) class DelServices(Resource): def delete(self, service_uuid : str): NETWORK_SERVICES.pop(service_uuid, None) - return jsonify({}), 204 + return make_response(jsonify({}), 204) def main(): LOGGER.info('Starting...') diff --git a/src/tests/tools/mock_sdn_ctrl/README.md b/src/tests/tools/mock_mw_sdn_ctrl/README.md similarity index 94% rename from src/tests/tools/mock_sdn_ctrl/README.md rename to src/tests/tools/mock_mw_sdn_ctrl/README.md index d8a6fe6b279553e54f13792cbf12f15b2b380dc2..8568c89ed22e2010bc565e28dc42821181dd6e0a 100644 --- a/src/tests/tools/mock_sdn_ctrl/README.md +++ b/src/tests/tools/mock_mw_sdn_ctrl/README.md @@ -12,8 +12,8 @@ Follow the steps below to perform the test: ## 1. Deploy TeraFlowSDN controller and the scenario Deploy the test scenario "microwave_deploy.sh": ```bash -source src/tests/tools/microwave_deploy.sh -./deploy.sh +source src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +./deploy/all.sh ``` ## 2. Install requirements and run the Mock MicroWave SDN controller @@ -27,7 +27,7 @@ pip install Flask==2.1.3 Flask-RESTful==0.3.9 Run the Mock MicroWave SDN Controller as follows: ```bash -python src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py +python src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py ``` ## 3. Deploy the test descriptors diff --git a/src/tests/tools/mock_mw_sdn_ctrl/run.sh b/src/tests/tools/mock_mw_sdn_ctrl/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..415fc1751f132478889fba2e0ec1f5da742e23f1 --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/run.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +python MockMWSdnCtrl.py diff --git a/src/tests/tools/mock_sdn_ctrl/microwave_deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh similarity index 100% rename from src/tests/tools/mock_sdn_ctrl/microwave_deploy.sh rename to src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh diff --git a/src/tests/tools/mock_sdn_ctrl/network_descriptors.json b/src/tests/tools/mock_mw_sdn_ctrl/scenario/network_descriptors.json similarity index 100% rename from src/tests/tools/mock_sdn_ctrl/network_descriptors.json rename to src/tests/tools/mock_mw_sdn_ctrl/scenario/network_descriptors.json diff --git a/src/tests/tools/mock_sdn_ctrl/service_descriptor.json b/src/tests/tools/mock_mw_sdn_ctrl/scenario/service_descriptor.json similarity index 100% rename from src/tests/tools/mock_sdn_ctrl/service_descriptor.json rename to src/tests/tools/mock_mw_sdn_ctrl/scenario/service_descriptor.json diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ad214b97c091bf82a8bfe5c0ce4183d0bae2766e --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile @@ -0,0 +1,35 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM python:3.9-slim + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Get generic Python packages +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools wheel +RUN python3 -m pip install --upgrade pip-tools + +# Create component sub-folder, and copy content +RUN mkdir -p /var/teraflow/mock_mw_sdn_ctrl +WORKDIR /var/teraflow/mock_mw_sdn_ctrl +COPY . . + +# Get specific Python packages +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Start the service +ENTRYPOINT ["python", "MockMWSdnCtrl.py"] diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..4df315cec178cef13eaa059a739bc22efc011d4d --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +docker build -t mock-mw-sdn-ctrl:test -f Dockerfile . +docker tag mock-mw-sdn-ctrl:test localhost:32000/tfs/mock-mw-sdn-ctrl:test +docker push localhost:32000/tfs/mock-mw-sdn-ctrl:test diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..ded232e5c50f8cd5ed448ec0193f58c43626f4ad --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +kubectl delete namespace mocks +kubectl --namespace mocks apply -f mock-mw-sdn-ctrl.yaml diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..05b89f949e940ae55ad592b9cc0e82a6eea2e343 --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml @@ -0,0 +1,46 @@ +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-mw-sdn-ctrl +spec: + selector: + matchLabels: + app: mock-mw-sdn-ctrl + replicas: 1 + template: + metadata: + labels: + app: mock-mw-sdn-ctrl + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-mw-sdn-ctrl:test + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8443 + resources: + requests: + cpu: 250m + memory: 512Mi + limits: + cpu: 700m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: mock-mw-sdn-ctrl +spec: + type: ClusterIP + selector: + app: mock-mw-sdn-ctrl + ports: + - name: https + port: 8443 + targetPort: 8443 diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..f4bc191062c8385b2eeb003832b284313305c795 --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in @@ -0,0 +1,21 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cryptography==39.0.1 +pyopenssl==23.0.0 +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +requests==2.27.1 diff --git a/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py new file mode 100644 index 0000000000000000000000000000000000000000..0329d30ad234398200c0fe29aac46f72f5a2e924 --- /dev/null +++ b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py @@ -0,0 +1,84 @@ +import json, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Optional + +LOGGER = logging.getLogger(__name__) + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +def create_connectivity_service( + root_url, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id, + auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None +): + + url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc'.format(root_url) + headers = {'content-type': 'application/json'} + data = { + 'etht-svc-instances': [ + { + 'etht-svc-name': uuid, + 'etht-svc-type': 'ietf-eth-tran-types:p2p-svc', + 'etht-svc-end-points': [ + { + 'etht-svc-access-points': [ + {'access-node-id': node_id_src, 'access-ltp-id': tp_id_src, 'access-point-id': '1'} + ], + 'outer-tag': {'vlan-value': vlan_id, 'tag-type': 'ietf-eth-tran-types:classify-c-vlan'}, + 'etht-svc-end-point-name': '{:s}:{:s}'.format(str(node_id_src), str(tp_id_src)), + 'service-classification-type': 'ietf-eth-tran-types:vlan-classification' + }, + { + 'etht-svc-access-points': [ + {'access-node-id': node_id_dst, 'access-ltp-id': tp_id_dst, 'access-point-id': '2'} + ], + 'outer-tag': {'vlan-value': vlan_id, 'tag-type': 'ietf-eth-tran-types:classify-c-vlan'}, + 'etht-svc-end-point-name': '{:s}:{:s}'.format(str(node_id_dst), str(tp_id_dst)), + 'service-classification-type': 'ietf-eth-tran-types:vlan-classification' + } + ] + } + ] + } + results = [] + try: + LOGGER.info('Connectivity service {:s}: {:s}'.format(str(uuid), str(data))) + response = requests.post( + url=url, data=json.dumps(data), timeout=timeout, headers=headers, verify=False, auth=auth) + LOGGER.info('Microwave Driver response: {:s}'.format(str(response))) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception creating ConnectivityService(uuid={:s}, data={:s})'.format(str(uuid), str(data))) + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not create ConnectivityService(uuid={:s}, data={:s}). status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(uuid), str(data), str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + return results + +def delete_connectivity_service(root_url, uuid, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): + url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances={:s}' + url = url.format(root_url, uuid) + results = [] + try: + response = requests.delete(url=url, timeout=timeout, verify=False, auth=auth) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception deleting ConnectivityService(uuid={:s})'.format(str(uuid))) + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not delete ConnectivityService(uuid={:s}). status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(uuid), str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + return results + +if __name__ == '__main__': + ROOT_URL = 'https://127.0.0.1:8443' + SERVICE_UUID = 'my-service' + + create_connectivity_service(ROOT_URL, SERVICE_UUID, '172.18.0.1', '1', '172.18.0.2', '2', 300) + delete_connectivity_service(ROOT_URL, SERVICE_UUID) diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index c6bacac9bc1723a020f3057fad9c9e8306c9dbca..24bc92b3a5a4aec4321c07b17830f6111be7176d 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -29,6 +29,7 @@ class AddDeviceForm(FlaskForm): device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY') device_drivers_onf_tr_352 = BooleanField('ONF_TR_352') device_drivers_xr = BooleanField('XR') + device_drivers_ietf_l2vpn = BooleanField('IETF L2VPN') 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)]) device_config_settings = TextAreaField('connect/settings',default='{}',validators=[DataRequired(), Length(min=2)]) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index ebf77a35ffdf9c2546ddbdd1bac0c8c1f54a2b56..bc46847704b28fb6ef44de0aae030ccb67935928 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -120,6 +120,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352) if form.device_drivers_xr.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) + if form.device_drivers_ietf_l2vpn.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: diff --git a/src/webui/service/static/topology_icons/Acknowledgements.txt b/src/webui/service/static/topology_icons/Acknowledgements.txt index b285d225957b0a4e8c14ac4ae5e078597d2a1b27..de69c89cee25dc93856761ac2dd08d9988a35095 100644 --- a/src/webui/service/static/topology_icons/Acknowledgements.txt +++ b/src/webui/service/static/topology_icons/Acknowledgements.txt @@ -24,3 +24,10 @@ https://symbols.getvecta.com/stencil_241/213_programmable-sw.32d3794d56.png => e https://symbols.getvecta.com/stencil_240/275_wae.c06b769cd7.png => optical-transponder.png https://symbols.getvecta.com/stencil_241/289_wae.216d930c17.png => emu-optical-transponder.png + +https://symbols.getvecta.com/stencil_240/128_localdirector.c1e561769f.png => optical-splitter.png +https://symbols.getvecta.com/stencil_241/158_local-director.6b38eab9e4.png => emu-optical-splitter.png + + +https://symbols.getvecta.com/stencil_240/197_radio-tower.b6138c8c29.png => radio-router.png +https://symbols.getvecta.com/stencil_241/216_radio-tower.5159339bc0.png => emu-radio-router.png \ No newline at end of file diff --git a/src/webui/service/static/topology_icons/emu-optical-splitter.png b/src/webui/service/static/topology_icons/emu-optical-splitter.png new file mode 100644 index 0000000000000000000000000000000000000000..12b7727d68ef749b52fcdd592c0427f63b58dc75 Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-optical-splitter.png differ diff --git a/src/webui/service/static/topology_icons/emu-packet-radio-router.png b/src/webui/service/static/topology_icons/emu-packet-radio-router.png new file mode 100644 index 0000000000000000000000000000000000000000..00257d0e2ee357dbdd392a408cfdbe07e006ff2a Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-packet-radio-router.png differ diff --git a/src/webui/service/static/topology_icons/emu-xr-constellation.png b/src/webui/service/static/topology_icons/emu-xr-constellation.png new file mode 100644 index 0000000000000000000000000000000000000000..d3bea498a4cd6d8a455d997e4833079f3e6b714f Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-xr-constellation.png differ diff --git a/src/webui/service/static/topology_icons/optical-splitter.png b/src/webui/service/static/topology_icons/optical-splitter.png new file mode 100644 index 0000000000000000000000000000000000000000..90a3d79b8ed4b8ae15f3d4a349cd08d741dcfdaf Binary files /dev/null and b/src/webui/service/static/topology_icons/optical-splitter.png differ diff --git a/src/webui/service/static/topology_icons/packet-radio-router.png b/src/webui/service/static/topology_icons/packet-radio-router.png new file mode 100644 index 0000000000000000000000000000000000000000..025172a587890341061b11ae57ce30184b8bc2f0 Binary files /dev/null and b/src/webui/service/static/topology_icons/packet-radio-router.png differ diff --git a/src/webui/service/static/topology_icons/teraflowsdn.png b/src/webui/service/static/topology_icons/teraflowsdn.png new file mode 100644 index 0000000000000000000000000000000000000000..ed2232e8223a39eb0d829e0e50975a697b0660fc Binary files /dev/null and b/src/webui/service/static/topology_icons/teraflowsdn.png differ diff --git a/src/webui/service/templates/js/topology.js b/src/webui/service/templates/js/topology.js index 50486d2a6826fedace55f7a62592fa083e7256a6..1b34f2b2c737c96ef18e925bd76ef28451f4120f 100644 --- a/src/webui/service/templates/js/topology.js +++ b/src/webui/service/templates/js/topology.js @@ -31,8 +31,8 @@ const margin = {top: 5, right: 5, bottom: 5, left: 5}; const icon_width = 40; const icon_height = 40; -width = 1000 - margin.left - margin.right; -height = 600 - margin.top - margin.bottom; +width = 1400 - margin.left - margin.right; +height = 800 - margin.top - margin.bottom; //function handleZoom(e) { // console.dir(e); @@ -70,11 +70,21 @@ var simulation = d3.forceSimulation(); // load the data d3.json("{{ url_for('main.topology') }}", function(data) { // set the data and properties of link lines and node circles - link = svg.append("g").attr("class", "links").style('stroke', '#aaa') + link = svg.append("g").attr("class", "links")//.style('stroke', '#aaa') .selectAll("line") .data(data.links) .enter() - .append("line"); + .append("line") + .attr("opacity", 1) + .attr("stroke", function(l) { + return l.name.toLowerCase().includes('mgmt') ? '#AAAAAA' : '#555555'; + }) + .attr("stroke-width", function(l) { + return l.name.toLowerCase().includes('mgmt') ? 1 : 2; + }) + .attr("stroke-dasharray", function(l) { + return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; + }); node = svg.append("g").attr("class", "devices").attr('r', 20).style('fill', '#69b3a2') .selectAll("circle") .data(data.devices) @@ -93,9 +103,9 @@ d3.json("{{ url_for('main.topology') }}", function(data) { link.append("title").text(function(l) { return l.name; }); // link style - link - .attr("stroke-width", forceProperties.link.enabled ? 2 : 1) - .attr("opacity", forceProperties.link.enabled ? 1 : 0); + //link + // .attr("stroke-width", forceProperties.link.enabled ? 2 : 1) + // .attr("opacity", forceProperties.link.enabled ? 1 : 0); // set up the simulation and event to update locations after each tick simulation.nodes(data.devices); diff --git a/src/webui/service/templates/link/detail.html b/src/webui/service/templates/link/detail.html index acac4a55392c2bf7f6261707ae1627a486affd10..916abafde05b3ec990346ff7966f207b1dafc10a 100644 --- a/src/webui/service/templates/link/detail.html +++ b/src/webui/service/templates/link/detail.html @@ -37,6 +37,7 @@ Endpoint UUID + Name Device Endpoint Type @@ -44,6 +45,9 @@ {% for endpoint in link.link_endpoint_ids %} + + {{ endpoint.endpoint_uuid.uuid }} + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index bee2e93c53896a8eeac826703a60afe02a5aa825..414aa19d0165ed7138f277005d5573c9242daefb 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -55,6 +55,7 @@ Endpoint UUID + Name Device Endpoint Type @@ -62,6 +63,9 @@ {% for endpoint in service.service_endpoint_ids %} + + {{ endpoint.endpoint_uuid.uuid }} + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index 8f223e44deda37b177a360a51b1e366f680fac27..13b69defeb95f66aba47a4aa78f98631ca8cc367 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -55,6 +55,7 @@ Endpoint UUID + Name Device Endpoint Type @@ -62,6 +63,9 @@ {% for endpoint in slice.slice_endpoint_ids %} + + {{ endpoint.endpoint_uuid.uuid }} + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }}